How to Remove the “Required” Category Base From Your WordPress Permalinks

by Michael on October 17, 2010 · 1 comment

Have you ever wished you could remove the “category base” from your WordPress permalinks? If so, then read on, because I just tackled – and solved – this annoying problem. Fear not. It’s a simple fix.


If you’re not sure what I’m talking about, the category base is a required part of the WordPress permalink structure that inserts the the word “category” between your domain name and the category name, like this:

http://www.jammersix.com/category/your-category-name/

You can customize the category base, like this:

http://www.jammersix.com/custom-base/your-category-name/

from the Setting/Permalinks subpanel, but removing it is not a supported option. For whatever reason, you have to have something there. This seems rather arbitrary, and sometimes it just gets in the way.

For example, I’d like to evolve this site into a multi-topic blog with different “channels” for different topics. As part of the conversion, I’d like to create a home page for each topic, and the easiest way would be to customize the category pages.

Ideally, I’d like to have the urls for each category archive look like this:

http://www.jammersix.com/category-1-name/
http://www.jammersix.com/category-2-name/
http://www.jammersix.com/category-3-name/

and so on…

Returning to the original question… How do you remove the category base? One option would be to hack the core WordPress files, but then you’d have to re-modify the code whenever you upgrade WordPress. Not good.

Instead, I poked around in search of a plugin, and guess what? I found one. It’s called WP No Category Base, and it works perfectly. Simply install and activate. There’s nothing to configure.

Once it’s active, your category page urls will just be your domain followed by the category slug, such as this:

http://www.jammersix.com/blogging-and-webdev/

While I’m not a huge fan of plugins for mission critical functions, this is the best solution I’ve been able to come with. Hopefully it won’t break with a future WP upgrade.

Anyways, problem solved. Now I just need to hack the category template into something a bit more presentable.


{ 1 comment… read it below or add one }

John McNallen February 5, 2011 at 4:12 am

I found that by adding ./ to the category base under ‘permalink’ solvs this problem

Reply

Leave a Comment

Previous post:

Next post: