Home / Tech Guide / Learn How To Remove Category From Your URLs In WordPress?

Learn How To Remove Category From Your URLs In WordPress?

/
/
/
1664 Views

Hello, Now we going to learn how to remove a category from your URLs in WordPress. This tutorial guide you how removes ‘/category’ from your category permalinks. (e.g. /category/my-category/ to /my-category/) For example “thinknowledge.com/category/blog” I just wanted to be “thinknowledge.com/blog”, i dont want to show category under permalinks.

This is the very simple solution I found out a quick trick to achieve this.

To get rid of the category you set your permalinks to /%category%/%postname%/ and then set the Category Base to period/dot.

*If you leave the category base blank it will display the WordPress default category.*

  1. Go to Setting > Permalinks
  2. Select Custom Structure
  3. Add /%category%/%postname%/ after your domain
  4. Change Category Base to period/dot.

how-to-remove-category-from-your-urls-in-wordpress

Removing Category From Your URLs With Yoast’s SEO Plugin

Another solution or easiest way to remove a category from your URLs is to use the Yoast SEO plugin. Yoast comes with a handy setting to remove the category base for you.

  1. Go to Yoast SEO
  2. Select advanced
  3. Click on the tab permalinks at the top
  4. Check Strip the category base (usually /category/) from the category URL.

removing-category-from-urls-plugin

Removing Category From Your URLs With .htaccess

To remove the category base manually in the .htaccess file just add this line of code.

RewriteRule ^category/(.+)$ http://www.site.com/$1 [R=301,L]

Removing The Category Base with the Remove Category URL Plugin

This plugin also removes the category base and seems to be very popular as well. I would recommend this method the least because too many plugins will slow your website down and require you to keep more plugins up to date. https://wordpress.org/plugins/remove-category-url/

Conclusion

All four methods above will work for removing the category slug from your URLs. Although I would recommend choosing the method that is going to use less code in your case.

Thank you for watching thinknowledge. Now you know Learn How To Remove Category From Your URLs In WordPress?

[amazon_link asins='B017ID54G6,B00C77U612,B017ID54G6,B00AUYYVZQ,B01LYSSFM7,8126554568,8131791882,1515233146,B01GSODGZC,1534954546' template='ProductCarousel' store='thinknowledge-21' marketplace='IN' link_id='c8bd129a-4dd0-11e7-80e2-3bd285adad9e']
  • Facebook
  • Twitter
  • Google+
  • Linkedin

Leave a Comment

Your email address will not be published. Required fields are marked *

1 Shares
+1
Tweet
Share1
Share
Pin