How you ever wondered how to add the category and subcategory in WordPress post URLs? Learn how to easily include categories and subcategories in WordPress URLs. Whilst having the Categories and subcategories in the URL help with SEO, Categories and subcategories provides a clear hieratically website structure which allows you to sort content on your website.
Additionally, having the names of the categories and subcategories in the URL allow your users to very quickly discover and browse the topics they are most interested in or looking for. In this post, we will show you how to include category and subcategory in WordPress URLs.
For most WordPress websites which use the default structures, this includes the date and time of publishing the article in the URL like below:
However, we want to be able to use the category in the URL like in displayed below:
1) First, you need to visit Permalinks page in your settings tab in your WrodPress admin. There you need to click on the ‘custom structure’ option under common settings area.
2) Next, you need to add
/%category%/%postname%/ in the field next to the custom structure.
3) After that, don’t forget to click on the save changes button to store your settings.
4) That’s all WordPress will now start including category and subcategory in WordPress URLs. You can see this in action by editing a post or creating a new one. After this, any time you publish a new article file that post under a category (and subcategory if you use them) and click on the update button by using the categories module on the right.
Once, this is set up, all future articles will have the categories in the URL.