Category page: hide category labels if a category doesn't have subcategories

Posted in: Newspaper
Post count: 11

Hi,

I know how to display subcategory labels in the category layout but, how to stop/avoid a category showing the rest of categories as its subcategories when it doesn’t have any subcategory?

Let’s make it clear:

I have a category called “Grammar” (no subcategories)
I have a category called “Vocabulary” (no subcategories)
I have a category called “Lessons” (no subcategories)
I have a category called “Resources” (which have 2 subcategories called “Books” and “Apps”)

When I go to the “Resources” category page, I get 2 labels under its title, called “Books” and “Apps”. That’s fine.

When I go to the “Grammar” category page, I get 3 labels (remember, that category has no subcategories) called “Vocabulary”, “Lessons” and “Resources” (the other main categories)…That’s not fine: how do avoid I that from happening? If a category doesn’t have a subcategory, I don’t want it to show any label at all.

Thank you

Post count: 23312

Hello ioeaia,

Please notice that this is talking about siblings subcategory and this behaviour appears only for category template 3,4,8. If you want to avoid this behaviour, you will have to change the category template used from theme panel, like this -> http://screencast.com/t/Ks0KgS7Xtg For more information about category template, please check our documentation here -> https://forum.tagdiv.com/category-templates/

Thanks.

Post count: 11

Thank you, Catalin

I was thinking about something more “automated”, so labels wouldn’t be shown if no subcategories exists, and they would if they exist.

As for now, I will adopt your suggestion on using another category template for those with no subcategories, but it would be nice to have a more automated way to achieve this (as if in a near future I add subcategories to some of my categories, I will have to change manually the category template, which is a little bit annoying).

Regards

Post count: 23312

Hello ioeaia,

In a future update, it is possible but we cannot say for sure if it will get done in the next update because we have a big list of fixes, improvements, and suggestions to implement. It’s hard to filter them and select which one gets implemented now and which one gets postponed. The developers decide if it gets done or not, though.

Thanks for your understanding!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.