WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Post category slug overlapping pages (5 posts)

  1. Josh
    Member
    Posted 1 year ago #

    I'm not sure what changed, but when my post category slug and a page slug are the same the pages won't load. It will instead go to my category template.

    I tried changing the category base to something with no luck. What can I do to fix this problem and separate the two without renaming them?

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    You need to avoid replicating page & category names. Or switch back to the default permalink structure.

  3. Josh
    Member
    Posted 1 year ago #

    Hmm, yes going back to the default permalink structure does fix this. The category base by default should go to index.php/category/{category_name}/ which shouldn't overlap with a base structure using index.php/{post_name}. Correct?

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    In theory, yes but permalink redirection is going to be based on slugs and, in this case {category_name} and {post_name} are the same. Hence the confusion.

  5. Josh
    Member
    Posted 1 year ago #

    I finally tracked the problem down. The Yoast SEO plugin was suppressing the category base slug which was in turn conflicting with the pages that had duplicate slugs.

    I just clicked to disable that feature and now all is back in order. Not sure if it's on by default, but something I've surely taken note of.

Topic Closed

This topic has been closed to new replies.

About this Topic