Auto Assign Parent Category When A Sub Category Is Added In WordPress

There is an issue with post categories in WordPress. You must have noticed that whenever you assign a subcategory on a post, the post gets only assigned to that particular subcategory and it doesn’t shows up on the archive page of parent category. In simple words, you post shows no relation with main parent category.

And for showing any post both on sub and parent category archive pages, you will be having to select both sub and parent category from the category meta box on post edit screen.

In this lesson we will show you how you can automatically assign mother category i.e. parent category when a subcategory is assigned to a post on your WordPress site.

Start by installing Auto Category plugin in WordPress

Upon activation Auto Category plugin does one thing, it automatically assign parent categories to the post when saved.

Auto Assign Parent category With Sub Category

Now when assigning a sub-category to a post, WordPress will not treat it as a separate category with no relation to the mother category.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.