How to remove category from wordpress url structure

There are many WordPress blog owner out there who do not pay close attention to the structure of their urls. If you’re a avid WordPress user then you may have notice that WordPress allows you to specify custom permalink structure for your urls. I am not sure what most blog owners use but I mostly think everyone used the:

If you’re using the above structure from your permalinks then you may have noticed that wordpress adds category into your email.


You would like the url to look like this.


This can be achieved using wordpress. Add the following code below to your functions.php file.

The code above tells WordPress that any url that is using the word category to remove category and rewrite the url without the category. This method is a cleaner approach then editing the .htaccess file since some WordPress owners have no experience editing the .htaccess file.

Joe Granados the author

Joe Granados is the owner of WebDevTuts. He is also a web designer & developer who loves to design and develop websites. If you're looking for him you can find him via @webdevtuts

Leave a Reply