Remove category slug wordpress from URL

Remove category slug wordpress from URL

Wp Developers are always looking for remove the category or blog slug from wordpress URL.  We can very easily remove the blog word from wordpress blog URL. Many clients want to remove the category word from URL. There are some nice wordpress plugins which will help you to remove the category word from wordpress URL.

I am using wordpress for long time. When wordpress 3.0 launched with multisite functionality we started using wordpress 3.0. Removing blog and category slug is very important for many clients.

Earlier also I written following article. But unfortunatly following code is not working now in newer release of wordpress.

https://purabtech.in/remove-blog-word-permalink/

Following wordpress plugins are useful:

WP No Category Base

As the name suggests this plugin will completely remove the mandatory ‘Category Base’ from your category permalinks ( e.g. myblog.com/category/my-category/ to myblog.com/my-category/ ).

The plugin requires no setup or modifying core wordpress files and will not break any links. It will also take care of redirecting your old category links to the new ones.

Manual method

Just add following code into your .htaccess file which you find in wordpress root folder.
RewriteRule ^category/(.+)$ http://www.site.com/$1 [R=301,L]

My suggestion:

Do not use any plugin or code for removing the category slug. If your client forces you to remove the category word then use wordpress permalink setting section. You can change the category slug from there. Following Note is given by wordpress.

Remove category slug wordpress
Remove category slug wordpress

“If you like, you may enter custom structures for your category and tag URLs here. For example, using topics as your category base would make your category links like http://example.org/topics/uncategorized/. If you leave these blank the defaults will be used.”

You can keep any slug name instead of category word.

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

3 thoughts on “Remove category slug wordpress from URL”

Leave a Reply

Your email address will not be published.