• I have some pages on my site which display posts from a specific category. Some of those posts belong to more than one category, so they appear on more than one page.

    My permalinks are set to /%category%/%postname%

    When you click on a post to enter its single post layout, it needs to pick either one of its categories for the permalink. Currently I have no control over what category is used. I guess my posts takes the one which was stored first. Instead I would like the permalink category to be based on the page which contained the post before it was clicked on.

    Should I replace the call to the_permalink() in my page loop to something custom? Can I overrule the default behavior of this function to return a link based on the page’s specific category?

  • The topic ‘/?tegory%/%postname% permalink with multiple categories’ is closed to new replies.