By default Wordpress set category url with the word “category” or prefix within it. But some people regard as ugly url and not too SEO url. Actually we can remove the word, and there are 2 ways to remove the word “category” in category url, one with plugin or add php tag in category template php. And in this post SEO Blog will explain on how to remove word “Category”.
I give a picture of what I am talking now, your category url by default is like this:
http://blogname.com/category/seo
And we want to remove the word “Category” into this url:
http://blogname.com/seo
*. SEO is the name of the category.
1. Using Plugins, there are 2 plugins I know that could remove the “category/” text from WordPress URL string
A. Using Top Level Categories
You can download the Top level Categories here.
B. Using Category Base Removal Plugin
You can download the Top level Categories here.
2. Using PHP tag. I think you better use plugins, because it’s a lot easier. But in regard of sharing knowledge I post this way too.
1. Login to your Wordpress via FTP, and go to category-template.php.
2. And find this:
$catlink = str_replace('%category%', $category_nicename, $catlink);
3. And put the following tag right beneath the above tag:
$catlink = str_replace('category/', '', $catlink);
The tag within your category-template.php should look like the following image:
Click the image to have a bigger view.
And the last thing you need to do is change your permalink into this permalink structure (go to setting – > permalink):
%category%/%postname%
.
Done!
There is also a problem if your current permalink structure is none as the above permalink. To resolve this you need a Permalink migration plugins. Go to this post because I’ve listed number of migration permalink plugins. Just wait:D. See you in the next post.


Thanks a lot Abi. We were having a lot of trouble with removing category in Wordpress 2.7. Your hack is a good start for now. Would love to see those plugins updated though.
Saya termasuk yg beruntung Mas. Nyasar ke salah satu blogs yang ngasih tau hal ini dari awal. Jadi settingan permalink nya udah seperti yg Mas Abi anjurkan.
Sekarang hal ini dibookmark ama saya.
Worked like a charm! Thanks for posting.
@Alecm you welcome buddy!
@Rudy, sip mas Rudy
@Hanna, you welcome friend
It works only first-level categories. And has a bug: doesn’t works with subcategories!
Yes this technique works for parent category only – and if your blog owns child category – it will go to 404 page.
Hi,
Previously I was using a plugin called “Top Level Cats” for the same purpose. When I tried to upgrade WP to the latest version, that plugin started giving problem.
Thanks to your tip, I have now upgraded to WP 2.7.1 and everything is working perfect. Thank you so much.
works like charms… thank you soo much
work only in parent category… what to do next?
nice post thank you so much for sharing
Thanks for the links and the explanation, I will use this on my website!