WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Permalink: domain.com/category_name? (6 posts)

  1. natalie
    Member
    Posted 6 years ago #

    I've searched through the docs and support and haven't found a way to do this. I'd like to have all categories (even sub categories) have permalinks at the root of the domain http://domain.com/category_name instead of http://domain.com/category/category_name/sub_category_name/.

    Maybe there's a plugin? A way to manually write it into the .htaccess file?

  2. moshu
    Member
    Posted 6 years ago #

    There isn't because it wouldn't work.
    You can change the word "category" to whatever you like better but WP needs that piece in the url to work properly.

  3. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    There is no good way to do this. Many have tried. All have failed. There are half-assed solutions that appear to work, but break other things.

    WordPress needs some sort of identifier there. You can change that identifier from "category" to anything you like on the Options->Permalink page, but the identifier is simply not optional.

  4. natalie
    Member
    Posted 6 years ago #

    I figured as much, thank you for confirming that for sure. I'm coming back to WP from Textpattern where I had a "color" category that people have linked to all over the web (and now is broken by my switch back to WP). For anyone looking for a solution to this, I'm going to make a page named "color", assign it a custom template which will show all of the posts in the color category. Wouldn't do it for all categories, but this one is more important.

    Thanks again!

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Alternatively, you could create an .htaccess rule to redirect that /color URL to the /category/color/ URL with a 301 redirect. This would allow search engines to find the newer page directly and update their links and such.

  6. natalie
    Member
    Posted 6 years ago #

    Even better, Otto, thank you! So simple but I never would have thought of doing that.

Topic Closed

This topic has been closed to new replies.

About this Topic