How to Remove the “Category” from a WordPress URL
Categories have been in WordPress as long as I have. They have important organizational value: they tell you what’s related to what—and they give your visitors a good way to browse your site. But what do you do when it’s not serving your URL structures?
Today, we’ll tackle two related small changes you might want to make when you remove a “category” from a WordPress URL: 1) removal of the segment or 2) a rename.
Renaming categories is a common request, and as we’ll get to in a minute. (It’s basically included as a WordPress setting already.) It’s a little more complicated in WordPress to remove “category” from URLs entirely. This might be the case if you have one called, say, How to Brew Coffee, and you wanted to make that a top-level page on your site.
example.com/category/how-to-brew-coffee. It’s subtle difference, but you may care about that.
Here’s the video explaining how to completely remove the “category” segment from the URLs of your WordPress site:
Quick Detour: Change “Category” with WordPress Category Base
As I said, you can use a setting called WordPress “Category base” to just change the word
category to something else, like
genre. This is a useful if you don’t mind the extra length of the URL, and are just looking to make your site more personal. So you’ll have something like
example.com/category/category-1 transformed into
example.com/genre/category-1. Here’s how you’ll do that:
- Be logged into your WordPress administration area.
- Navigate to “Settings > Permalinks” from the left-side menu bar.
- Scroll down past the main setting for your site’s permalinks foe posts. You’ll see the heading “Optional” and then two fields. To change the way your categories appear in your WordPress site URLs, you’ll change the “Category base” value to whatever you want. To stick with our theme, I’ll set it to
genre. Now all my categories have new URLs.
So, that’s how you change the value of your WordPress category base. But what if you want to remove it entirely? That’s our next topic…
WordPress Remove “Category” from URLs, Step-by-Step
Our goal in these how-to guide is to make WordPress remove “category” from permalink (s) across our site. To do that, we’ll be using a plugin: No Category Base (WPML) from Marios Alexandrou. Here are the steps we’ll need:
- In the WordPress administration area of your site, got to “Plugins > Add New.”
- Search for “No Category Base (WPML).” You’ll install and activate the plugin from this screen. To that, first click the “Install” button on the plugin listing, then once that has changed to an “Activate” button, click that as well.
- You’re done, you’ve removed “category” from WordPress URLs. With the plugin installed and activated there’s not really anything else to do. (It has no setting screen.)