• Resolved ThreeD

    (@threed)


    I have been trying to figure this out for hours and I can’t seem to get the /category/ element in the category links or the navigation menu to disappear. (I found this link where somebody had the same issue)

    The element I’m talking about is the bold part below:

    https://www.domainnamehere.com/category/cars/audi/

    /category/ ONLY appears in category links or in the top navigation menu consisting of “category” links. It does NOT appear in post links, page links or breadcrumbs.

    I’ve tried editing the .htaccess file – No Go
    I’ve tried to change the permalinks to /%category%/%postname%/ – No Go
    I’ve tried this with a default wordpress template (twentyeleven) – No Go
    I’ve tried to clear all cache and reset the settings – No Go

    Since when is this /category/ stuff implemented? I really don’t understand what it’s supposed to be good for.

    I just noticed another worpress install of mine has the exact same problem on a separate site. That’s version 3.4!

    Any help is appreciated.

    Thanks ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    The /category/ piece is auto-generated by WordPress. It’s called the “category base” and it tells WordPress that whatever follows is a category name.

    If you have a link that looks like https://example.com/whatever/, then WP has no way to know if /whatever/ is a page, a category, a postname, etc. The /category/whatever/ lets WP know that “whatever” is a category.

    The use of “/%category%/%postname%/”, or anything else in that field, only applies to the single-post-link page. All the rest of WP’s link patterns are built automatically, and are not under your direct control. Unless you use a plugin or write custom code to change them.

    Thread Starter ThreeD

    (@threed)

    Thank you for the explanation, Otto. Is that a new implementation in 3.x? I can’t remember ever having seen that in previous/older 2.x versions.

    Would you advise against removing the /category/ part?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    The category-base has always existed, it isn’t new. And it’s not possible to “remove” it without changing the code.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Why is there a /category/ in my menu path?’ is closed to new replies.