Remove Category from URL – WordPress

0 284

In this article, we will discuss “Remove Category from URL WordPress”. WordPress provides an easy way to manage URLs. When we create categories in WordPress then the URL contains the category keyword. It is default nature of WordPress. This will increase the length of the URL, sometimes we need to remove the category from URL so make our URL shorten and easy to manage.

There are so many ways to remove the category from URLs.

Remove Category from URLs with Permalinks

You can use the following steps to update your URLs.

Step 1: Go to Settings -> Permalinks.

Remove Category from URL WordPress

Step 2: Update the permalink custom structure. Add category and post name in the custom structure.

Remove Category from URL WordPress

Step 3: Now, time to update the “Category base”. Add the dot in category base and save the changes.

Remove Category from URL WordPress

Adding a dot to category base in the setting is mandatory. As leaving this field blank will use the default value. You can check the URL after and before the update of the above mention settings. Currently, this trick is tested within the latest version of WordPress. But there are no guarantees that it will work in the future as well.

Remove Category from URL with .htaccess

Add the following code snippet in your “.htaccess” file.

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

The above code snippet helps you to remove the category slug from WordPress permalink.

Removing Category from URL with a Plugin

Some of the plugins are available, which help us to remove the category from the URL such as Remove Category URL and FV Top Level Categories. Plugins provide the additional benefits, I am choosing randomly both the plugins. Maybe other plugins are available, You can choose as per your research.

Conclusion

In this article, we discussed “Remove Category from URL – WordPress” a WordPress tip. Please feel free to add the comment if any query or you can submit your feedback. Also write us if anything I missed in this article.

Leave A Reply

Your email address will not be published.