You don't have to use subcategories, and many large blogs (including WPBeginner) don't, but subcategories are helpful if you have a large category with many posts that could be grouped into smaller sections.
For example, you could have a “Recipes” category that contains a growing number of gluten-free recipes.
Posts in the category 'Recipes'
You can put these posts in their own subcategory so that readers can easily find them. You create a new subcategory for "Recipes" called "Gluten Free" and move these posts into that category.
Use categories in the URLs of your posts
Some websites use the category name in permalinks (post URLs), which you can set up under Settings » Permalinks .
Including your posts' categories in your URLs
If this is the case on your website, then your post korea telegram data will initially have a URL like this:
.. ./recipes/gluten-free pancakes/
After the post was moved to a subcategory, it has a new URL:
… /recipes/gluten-free/gluten-free-pancakes/
Normally WordPress will try to redirect the old URL to the new one. It's definitely worth checking if your links still work. If necessary, you can create a 301 redirect from the old URL to the new one .
Another option is to leave the post in the parent category and assign it to the child category as well, but this can have disadvantages.
Although the WPBeginner website has categories in the URL, we always recommend users to use a shorter URL structure that only contains “post name”. This gives you maximum flexibility in restructuring content without having to worry about setting up redirects.
Do you need to use subcategories in WordPress?
-
Mostafa044
- Posts: 648
- Joined: Sat Dec 21, 2024 5:47 am