Learn how to include category and subcategory in WordPress URLs506

Author: InfoBeep - September 12, 2017 | subject to copyright

Categories and subcategories allows user to sort content which makes it easier to browse the interested content. In this article, we have tried to include information that will help you to include category and subcategory in WordPress URLs.


Include category to SEO friendly URLs in WordPress

WordPress by default has 2 inbuild taxonomies called categories and tags which helps to sort your content. Categories are used for broader tops and can have subcategories.

However, categories and subcategories are not included in your post URLs, if you use default WordPress URL structure.

Here are some examples of URL where category and subcategory are placed in the URL. For eg:


Here, plugins is the category.


Here, news is the category and international is child is sub category

Use of category and subcategory makes your URLs more user friendly. And, as it includes more keywords and text, it is helpful for SEO.


Adding category and subcategory in WordPress post URLs

In order to add category and subcategory in WordPress post URLs follow the steps below:

  1. GotoSettings > Permalinks. Now, click on the ‘custom structure’ under common setting area.
  2. Now, add /%category%/%postname%/ in the custom structure field and click on save settings.
  3. File post under a category (subcategory) and click on the update button

Note: you will notice category and subcategory included in the post’s permalinks


Using multiple categories or subcategories

There may be case where you have multiple categories and subcategories for the same post. In this case, WordPress chooses the category alphabetically for creating links. Sometimes you may even have category, subcategory and sub-subcategory. In this case, WordPress will include all 3 of this to create a URL.