A lot of WordPress themes automatically show a list of the tags and categories which were assigned to a page or post.
Great for the search engines and users finding groups of posts they might be interested in but with one very annoying consequence.
The addition of /category/ into your URL as below:

It looks messy, cheap, longer means harder to remember and adds no value whatsoever.
This is a technique I use on most of the WordPress sites we build in order to remove the category base from the site URLs and acheive this instead:

Here is the solution:
1) In your wp-includes/category-template.php file search for the following line of code:
Directly below that, insert the following line of code:
2) In your wp-includes/classes.php file search for the following block of code:
Just below that, insert the following:
3) Finally, in your .htacces file, add the following to redirect your old /category/ URLs to your new ones (if your blog doesn’t reside in the root, you’ll have to tweak it):



















Super useful, thank you!
Is it possible to remove the search base safely? I tried to remove the search base by modifying the search_structure with $wp_rewrite command. But then even the posts are redirected to the search page. Any idea?