Tell us what you are trying to do?
I am trying to manually add a linked first item to the following 'view' using [wpv-item index=1] but it breaks the view
[wpv-conditional if="[wpv-loop-index] eq 1"]
Conditional block for first loop item
[/wpv-conditional]
[wpv-conditional if="[wpv-loop-index] ne 1"]
Conditional block for other loop items
[/wpv-conditional]
Next, for the inner conditions for the first loop items, you'll need to update the evaluations so that the term ID 454 (Beauty & Wellbeing) is used, instead of the current term ID from the view's loop.
Here is how the complete content in the loop item will look like:
As for your other question, can you please share some examples of views that are being used for different CPTs, but for similar functionality? I'll be in a better position to guide you accordingly.
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 linkhidden linkhidden 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
New threads created by Waqar and linked to this one are listed below: