Forums

[resolved] Subcategories not showing up in URI with pretty Permalinks (3 posts)

  1. Marventus
    Member
    Posted 3 months ago #

    Hello everyone! I am experiencing a problem with the way WP is handling the %category% tag inside the Permalink structure, and I think this problem might exceed my own installation.

    I have the following custom Permalink structure on my site:

    /%category%/%postname%/

    According to the Permalink documentation:

    %category%:
    A sanitized version of the category name (category slug field on New/Edit Category panel). Nested sub-categories appear as nested directories in the URI.

    However, subcategories are not being included in the URIs. Here is an example: The post is listed under parent cat "Derecho y" ("Law and" in EN) and subcat "Cultura" ("Culture" in EN), but it's permalink structure remains:

    [site-root]/[category]/[postname]

    Instead of:

    [site-root]/[category]/[subcategory]/[postname]

    I have found the following old threads about this issue:

    I made sure that parent category ID numbers are lower than its children's, reset my theme to TwentyEleven, and deactivated all plugins except for Exec-PHP, Role Manager, and Akismet with no results.
    I am using WP 3.3.1 and PHP 5.2.17.

    Any thoughts?

  2. jfrancofarias
    Member
    Posted 3 months ago #

    Hi Marventus,

    The solution is having the parent category ID greater than any of the child ones.

    e.g.

    to show this permalink: http://www.domain.com/parentcat/subcat/post

    Your cat ids should be something like this...

    http://www.domain.com/100/<100/post
    http://www.domain.com/10/2/post, etc.

    How to change your cat ids?

    Here's an article: http://wordpress.org/support/topic/how-to-change-category-ids-in-wordpress-27?replies=7

  3. Marventus
    Member
    Posted 2 months ago #

    The solution is having the parent category ID greater than any of the child ones.

    Thanks for the heads up! I was absolutely 100% convinced that it was the other way around. As the Germans would say, "Scheiße...", ;-)
    I'll try it the other way around and let you know.
    Thanks!

Reply

You must log in to post.

About this Topic