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.
Related posts:





No Comments Yet - be the First!