Guide to Include Category and Subcategory in WordPress URLs

Including categories and subcategories in WordPress URLs can improve the structure of your site and make navigation easier for users and search engines. This guide will provide you with all the information you need to make these adjustments effectively.

Importance of Categories and Subcategories in URLs

The categories and subcategories are essential elements in WordPress that help organize your content. By including these hierarchies in your URLs, you not only improve the user experience, but also optimize your site's SEO. A well-structured URL can increase click-through rates and improve search engine rankings.

Benefits of using categories in URLs

  • Improved navigation: It makes it easier for users to find related content.
  • Optimized SEO: Keywords in the URL can improve positioning.
  • Content organization: Keeps your site structured and easy to manage.

How to Configure Categories and Subcategories in WordPress

To include categories and subcategories in your URLs, follow these simple steps:

1. Create categories and subcategories

First, you need to create the categories and subcategories from the WordPress administration panel:

1. Go to "Entries" and select "Categories".
2. Add the name of the category in the corresponding field.
3. If you want to create a subcategory, select the main category from the "Parent category" drop-down menu.
4.		
Guide to Include Category and Subcategory in WordPress URLs
Download our web maintenance guide Free of charge!
Free guide for freelancers and small businesses that want to avoid surprises and improve their web performance.
Click on "Add new category".

2. Adjust the permalink structure

Once you have your categories created, the next step is to adjust the permalink structure to include these categories in the URLs of your posts.

1. Ve a "Ajustes" y selecciona "Enlaces permanentes".
2. Elige la opción "Personalizada" y añade la siguiente estructura:
   /%category%/%postname%/
3. Guarda los cambios.

Examples of Effective URLs

Below are examples of what URLs would look like when implementing categories and subcategories:

  • For a publication about cooking recipes in the category "Cooking" and subcategory "Desserts": tusitio.com/cooking/desserts/name-of-publication
  • For an entry on digital marketing in the category "Marketing" and subcategory "SEO": tusitio.com/marketing/seo/name-of-publication

SEO Considerations When Using Categories in URLs

It is important to keep in mind several SEO aspects when structuring your URLs with categories:

1. Use of keywords

Make sure your categories and sub-categories contain relevant keywords that describe the content. This will help search engines to index your pages correctly.

2. Avoid excessive use of categories

Too many categories or subcategories can confuse both users and search engines. It is advisable to keep the structure simple and clear.

Tools to Manage Categories and URLs in WordPress

There are several tools and plugins that can facilitate the management of categories and URLs in WordPress:

  • Yoast SEO: It allows you to manage the structure of URLs and offers recommendations to improve SEO.
  • Rank Math: Another SEO plugin that helps to optimize categories and subcategories on your site.
  • Simple Category Order: Facilitates the reordering of categories for better organization.