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 https://toolset.com/forums/topic/setting-a-specific-style-for-the-active-taxonomy/?
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
Hi,
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 )
regards,
Waqar
My issue is resolved now. Thank you!