Remove your category slug from wordpress blog’s category url, how is it ?

Remove your category slug from wordpress blog’s category url, how is it ?

If you are thinking to clean up your WordPress permalinks, you should first remove your Category slug from the blog’s Category url. Today, I’m going to show how to remove it from your blog.

By default, WordPress shows ‘Category’ as slug in the permalink. Some people change ‘Category’ using Settings > Permalinks > Optional > Category Base. Several times, I renamed ‘Category’ to ‘Sections’ or ‘Topics’ and these sounds much better than ‘Category’.

http://www.myexample.com/category/wordpress

http://www.myexample.com/sections/wordpress

http://www.myexample.com/topics/wordpress

However, some people want to remove it totally. That looks good too.

http://www.myexample.com/wordpress

How To Do It?

First of all, we have to remove the slug… duh! Let’s install WordPress No Categories plugin. I guess you already know how to install plugins in WordPress. If you don’t know then check this out. Once you activate this plugin, it will automatically remove the Category slug, you don’t have to do anything else.
Here is the BUT

If you are installing a new WordPress blog and you are removing the Category slug, it’s safe to change the URL without thinking the consequences. But think, if you already have a running blog and you are changing the permalink, then the old URL will end at your 404 page. So here is the solution.

Install and activate WordPress Redirection plugin. Now access Redirection options using Tools > Redirection and use Add new redirection. Now type “category” in the Source URL without the quotation marks, leave all the other options unchanged, even leave the Target URL blank and hit ‘Add Redirection’ button.

That’s it. You are successfully removed the slug and redirected all the permalinks with ‘category’ to new permalinks without any slug.

No comments:

Post a Comment