• Hello πŸ™‚

    I want to make a custom Permalink for my Plugin and show custom content there.
    ?read=article -> /read/article

    Or does anyone know how to make a page, where I put the content in dynamically and change the title of this page?

    How can I do that?
    Maybe some tips?!

    Sorry for bad English πŸ™‚

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    You can modify any permalink output with ‘the_permalink’ filter, but that does not mean WP will know what to do with it. You will likely also need to add a rewrite rule.

    You can create an entire new page dynamically, title, content, everything, by simply calling wp_insert_post() and specifying the post_type is “page”.

    Thread Starter Waishon

    (@waishon)

    @bcworkz
    Thanks πŸ™‚

    I think I should use the add_rewrite_rule function, but how does the rewrite rule looks like? Should the rewrite function also include the other rules from standard wordpress or is the ?read -> /read/ rule enough?

    I am working on a site ethnicforever.com please tell how to make url seo friendly in WordPress and also how SEO Yoast can be used for seo purpose.Any suggestion will be very helpful and useful for me please visit the website and recommend me what i should do.Thanks in advance.

    Moderator bcworkz

    (@bcworkz)

    Hi Waishon, all I can suggest is you study the Codex examples. I don’t have much experience with these rules, I only recognize when a situation calls for them. It’s important to have an understanding of RegExp. That parameter is what allows you to construct a rewritten URL that WP can understand. I can tell you that you only need to concern yourself with your specific need, the other rewrite rules already established will remain.

    Be sure to use flush_rewrite_rules() after altering anything in the rewrite structure. Alternately, you can do this manually by toggling permalinks off and on in the Settings admin area.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Own Permalinks’ is closed to new replies.