0

is there a way to have a "special" category in WordPress that will be displayed in all categories? Or is there any way to make parent category displayed on sub-categories?

For example, the categories in my website are:

  • Asia
    • South Asia
      • India
      • Bangladesh
      • etc
    • South-East Asia
      • Indonesia
      • Thailand
      • etc

I want to put the post of Asia category to all sub categories, so when I visited www.mywebsite.com/thailand or bangladesh or others, I will also find post of Asia.

I don't know how to code (well, I know little bit), but tutorial always help me. Any help will be appreciated.

Regards.

0

With the categories you have presented I would expect the third level categories to have a URL like www.mywebsite.com/category/thailand. UNLESS you are using some plugin to remove the "category base".

The nature of hierarchical categories is that at each level you filter down to a more precise set of posts. It would be unexpected to see posts of all Asia when you are on a category archive page for Thailand.

You may be looking for a sidebar widget that lists all your categories and has a link list to the entire categories hierarchy, in which your categories will be lists as above. Users can click the link to see all posts in that category. This sidebar could exist on your post archive pages AND post single pages.

4
  • Dear @dylanjameswagner, thanks for your answer. Yeah you're right, the url would be: [link]www.mywebsite.com/category/thailand However, there are some posts that are categorized for Asia which I want to show to all sub-categories and sub-sub categories without ticking them. That is what I mean. Do you think it would be possible? – Andri Zainal Kari Dec 5 '20 at 14:21
  • This might be a case for using "related" posts or "featured" posts on the post single based on the greatest ancestor category, "Asia". So users can see teasers from those posts. – dylanjameswagner Dec 7 '20 at 4:48
  • If you absolutely want to show posts from Asia when a user is on a Thailand archive page maybe you need to rethink your original strategy and category hierarchy, because thats not really how they are supposed to work. Maybe you could make curated page/content that doesn't use the automatic category pages. – dylanjameswagner Dec 7 '20 at 4:52
  • One more thing, incase it isn't clear. If you categorized each post with the whole category chain, Asia, South-East Asia, and Thailand then all sub category posts will appear below the top-level category, etc – dylanjameswagner Dec 7 '20 at 4:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.