How to remove category slug from Wordpress permalinks
On This Page
Requirement
Change default WP category URL mysite.com/category/foo
to mysite.com/foo
The site I'm working on already uses the Yoast SEO plugin, which I also use for its breadcrumbs feature. Hence the Yoast-dependent solution. See reference links for other, non-Yoast solutions.
Solution
- Log into WP Admin
- SEO > Search Appearance > Taxonomies > Category URLs > "Remove the categories prefix?" Choose "Remove"
- Settings > Permalinks > Optional, Category base > Fill with
.
- SEO > General > Notifications > Reindex permalinks (this option appears after we have modified permalinks settings)
References: