Skip Navigation

[Resolved] Conditional content depending on the current archive taxonomy page

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 1 year, 4 months ago.

Assisted by: Minesh.

Author
Posts
#2631139

Hello, I have created a custom taxonomy by the slug 'shop-type'.
I would like to use a condition on this taxonomy's archive page, in order to show different html content, depending on which category I'm currently viewing.
So, different content for 'shop-type-> bakery ' and different contebt for 'shop-type-> supermarket'
Thank you!

#2631221

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I would like to know where exactly you want to add the conditional display. Do you want to add condition within the archive's loop or outside the archive loop?

In addition to that - Could you please send me debug information that will help us to investigate your issue.
=> https://toolset.com/faq/provide-debug-information-faster-support/

#2631373

hi Minesh, thank you.
Yes, my html will be added outside the archive loop

#2631427

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

We just released new set of plugin update for Toolset plugins. Could you please update ALL Toolset plugins to it's latest release version. You can download the latest plugin from your account's page:
- https://toolset.com/account/downloads/

What if you try to add conditional statement, for example outside your view's loop:

[wpv-conditional if="( '[wpv-taxonomy-slug]' eq 'bakery ' )"]
				You are in the bakery.
	[/wpv-conditional]'

[wpv-conditional if="( '[wpv-taxonomy-slug]' eq 'supermarket' )"]
				You are in the supermarket.
[/wpv-conditional]
#2631487

I dont know why it was so hard for me to find it! But as always, you've been great help... Many many thanks 🙂