How To Remove Category From the WordPress URL

Last Updated : 09-06-2024

How To Remove the Category From the WordPress URL

Go to your WordPress dashboard. Select Setting >> Permalinks>> Category base > . Press only dot . and Save changes’. To change your bases of tags and categories, go to your admin dashboard, and then go to Settings > Permalinks> Category base> Press . (dot) and Save

You Can See In The Image How To Remove Category From the WordPress URL

To get rid of 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.

Note that providing dot to Category base in settings is the must. As leaving it blank will use the default value. Visit a post after saving settings and check the URL, it won’t have the category base now. While this trick currently works, there’s no assurance that it will work in the future as well.

Remove Category From Your URLs with .htaccess

RewriteRule ^category/(.+)$$1 [R=301,L]

You can also add this code to your .htaccess file through FTP rather than using a dot. Add the code before the closing </IfModule> tag in the file and it will remove the category slug from WordPress permalink.

How To Remove Category From the WordPress URL ?
Remove Category From url WordPress, Remove Category Base from WordPress Category url.