Skip Navigation

[Resolved] Split: Managing conditional display for multiple taxonomies

This support ticket is created 2 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by johnh-18 2 years, 6 months ago.

Assisted by: Waqar.


Hi Waqar,
I did not realise you had kindly already implemented the code for the 'beauty & wellbeing' CPT until I logged in yesterday evening - many thanks. I spent yesterday evening implementing the same solution for the other CPTs.
I mentioned in an earlier message that the way I have created the view means that I have to have separate views for each CPT and you asked for an example - please see hidden link
Also, if you go to hidden link you will see that 'VIEW ALL' is highlighted in red which is just as it should be. However, if you click on any of the destinations, eg hidden link you will see that the red highlight has disappeared. The reason, I believe, is that the links for 'beauty & wellness' or 'for your home' are child categories. However, for 'villas and chalets', the links are not regular category links but a separate taxonomy. The reason I had to do it this way is that hidden link hidden link hidden link can have the same destination, eg Spain exists for both 'villas & chalet' and 'luxury real estate' but I can only have Spain as a child-category once - hence separate taxonomies. Is there a way around that by tweaking the function I borrowed from
Again, please let me know if you prefer I open a separate ticket for the above.
Thank you for your help and best regards / jan



In the view "location-villas", the conditional blocks for the first and the rest of the items, both are using the taxonomy "category" for evaluation.
( screenshot: hidden link )

This is fine for the first item, because the target term "Holiday rental" (ID: 24) is part of the taxonomy "Category". But, the rest of the terms are not part of the taxonomy "Category" and instead, belong to the taxonomy "Holiday rentals locations".

For this reason, in the conditional block for the rest of the items, you'll need to change the taxonomy slug from "category" to "holiday-rentals" and the highlighting will work correctly for the destinations too.
( screenshot: hidden link )



My issue is resolved now. Thank you!

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.