• Hi there, I appreciate any help in advance.

    I have followed a few guides to remove /category/ from the URL by putting together a custom structure of /%category%/%postname%/ with a period (.) in the category base.

    This works properly, until it comes to sub-categories.

    For example website.com/europe works properly and links to the category.

    But website.com/europe/portugal links to the 404 page.

    I cannot figure out why the sub-category under the parent (europe) causes a 404.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I solved my problem by following steps.

    Option 1: Use a Subdirectory for Categories

    1. Go to Settings > Permalinks.
    2. Choose the Post Name option (e.g., /postname/).
    3. This creates a subdirectory structure for categories (e.g., /europe/portugal/).

    Option 2: Keep Category Base with Slight Adjustment

    1. Go to Settings > Permalinks.
    2. Choose the Custom Structure option.
    3. In the custom structure box, enter: /category/%category%/%postname%/ (notice the double %category%).
    4. Leave the Category Base as empty.
    Thread Starter coldxot

    (@coldxot)

    Hey Jaward, I sincerely appreciate the offered adivce.

    Option 1 unfortunately led to 404s on all category pages.

    Option 2 works.. but the “/category/” aspect of the URL is what i wish to avoid.

    I do not want it to be website.com/category/europe/portugal

    But rather website.com/europe/portugal

    Additionally having %category% twice doesn’t seem to work as there may be some categories that only have one like website.com/europe

    • This reply was modified 8 months, 2 weeks ago by coldxot.
    • This reply was modified 8 months, 2 weeks ago by coldxot.
    Thread Starter coldxot

    (@coldxot)

    Wondering how to go about getting support for this.

    It seems like it should be a simple fix but i’ve struggled to figure it out still.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing /category/ in URL not working for sub-categories’ is closed to new replies.