• Resolved Gemini23

    (@gemini23)


    This is on a new site

    Is this happening with others? surely domain/category/sub-category/ etc must be used a lot!

    I am getting ‘page not found’ which has happened again…
    /%category%/%postname%/ as the permalink structure.

    And… with the url string domain/sub-category/ displaying the sub-category content which is at
    /domain/category/sub-category

    I have read that maybe WordPress ‘thinks’ that there should be a post after /category/

    Anyone any idea what is going on here? (and how to stop it from happening ain)

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

    (@bcworkz)

    You could have conflicting rewrite rules. WP should only think the last URL element is a post slug when /category/ does not occur in the URL. When /category/ does exist, WP is expecting an archive query for the final term. A sub-category URL should work even without its parent terms in the URL, although for post requests WP will redirect to the full URL.

    Re-visit the permalinks settings screen. No need to change anything. Doing so will cause rewrite rules to be regenerated and could resolve any conflicts. If this does not help any, you likely have a theme or plugin that has introduced conflicting rules. As a test, try deactivating all plugins and switching to a default Twenty* theme. Re-visit permalink settings once again. Proper sub-category requests should now work.

    To determine which module was the cause, restore your theme and plugins, testing after each. Be sure to re-visit permalinks settings after each as well. When the problem recurs, the last activated module would be the cause.

    It’s conceivable that a faulty query is the cause instead of faulty rewrite rules. The above test will still reveal the problem module regardless of what the problem is.

    Thread Starter Gemini23

    (@gemini23)

    re-saving the permalinks fixed this.

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

The topic ‘Problems with sub-categories’ is closed to new replies.