WordPress Permalinks with Multiple CategoriesCreating complex URLs has never a been a great strength of WordPress.

For example, for a long time, it was recommend that you shouldn’t include categories in your URLs because of performance issues.

However, the WordPress team have been making improvements on this, and now it’s possible to include not just one, but multiple categories inside a URL. In this tutorial, we’ll show you how to make that happen.

Step 1. Organize your categories

  • Go to Posts > Categories
  • Set up your categories so that they are organized in a hierarchy like in the image below. You do this using the “Parent” option for each category.
media_1390488302433.png

Step 2. Permalink structure

  • Go to Settings > Permalinks.
  • Add the category to your Permalinks. You can do that by using this set up: /%category%/%postname%/
media_1390488580718.png

Step 3. Add only one category

  • Go go to a post and look for the Categories block.
  • Choose one and only one category. The reason, WordPress will stop creating the URL as soon as it finds a category in the hierarchy hierarchy.

For example, choose category 3 …

media_1390488492510.png

And you get this URL with all of the categories, including 3:

media_1390488744806.png

However, if you choose both 2 and 3 …

media_1390488800931.png

Then WordPress stops creating the URL after 2:

media_1390488841054.png