Connect with us

How to Remove the Category Base from URLs in WordPress

How to Remove the Category Base from URLs in WordPress

WordPress

How to Remove the Category Base from URLs in WordPress

Want to remove “category” base term from your Wordpress URL. Turning example.com/category/news into example.com/news?. Learn how to remove taxonomy slugs (categories, post tags).

Are you looking for how to remove /category from your URLs in WordPress? I was also searching for how to remove taxonomy slugs (categories, post tags), and finally, I found the solution which will share with you.

How to Remove Category from Post

First, let us learn how to remove taxonomy slugs from a WordPress Post.

Take the below Post URL as an example:

https://example.com/category/sample-post

You can see /category/ is present in the URL.

So that I need to make URL as

https://example.com/sample-post

To change Remove Category slug from Post URL

Common permalink settings in WordPress
Common permalink settings in WordPress
  1. Go to Settings> Permalinks
  2. Select Post Name [https://example.com/sample-post/]
  3. or Select Custom Structure and Add /%postname%/ after the root domain name.
  4. Save Changes
Remove Category slug from Post URL
Remove Category slug from Post URL

To change or Remove Categories Prefix

Method: Using Yoast SEO Plugin

Category URLs in WordPress contain a prefix, usually /category/, using Yoast SEO plugin you can remove that prefix, for categories only.

Remove Categories Prefix in WordPress
Remove Categories Prefix in WordPress
  1. Login to your WordPress website Dashboard
  2. Click on ‘SEO’ >Search Appearance
  3. Click on the ‘Taxonomies’ tab.
  4. Toggle the ‘Category URLs’ switch.
    • To Include Category prefix, Switch to ‘Keep’.
    • To Exclude, Switch to ‘Remove’.
  5. Save Changes
Remove the categories prefix using Yoast SEO Plugin
Remove the categories prefix using Yoast SEO Plugin

Conclusion

There are many other methods to remove category base from URLs in WordPress, it may be using htaccess or using some other third-party plugin. Let me know your thoughts via comments.

Click to comment

Leave a Reply

Your email address will not be published.

More in WordPress

To Top