Skip Navigation

[Closed] Display Shortcode Based on Taxonomy

This support ticket is created 7 years, 9 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 7 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#413970

Howdy:

I want to display a different map shortcode based upon taxonomies. How would I accomplish this?

For example: this shortcode [google_maps id="10129"] if the Neighborhood taxonomy equals: Lakeview.

I thought I could use a conditional output but it does not appear I can based upon a taxonomy?

#413983

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Could you please provide more information about your setup. I understand you would like to display conditional output based on taxonomy terms. But is taxonomy term is attached to specific posts?

Have you gone through our Docs:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/displaying-taxonomies-conditionally/

#414272

Hi:

Thanks for the response. Yes the taxonomy "neighborhood" is attached to every custom post "apartments."

Here is the code I am using after referencing the link you provided:

[wpv-conditional if="( has_term('Streeterville') eq '1' )" ][google_maps id="10129"][/wpv-conditional]

It is not working. To clarify I need to display one specific map for each neighborhood (taxonomy) such as neighborhood 1, neighborhood 2 etc.

There are about 14 neighborhoods in total so my thought was to list each map shortcode with a conditional input so the correct map would display according to it's taxonomy.

#414384

Minesh
Supporter

Languages: English (English )

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

I would like to review your current setup.

1)
Could you please share problem URL as well as view name you are using.

2)
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

The topic ‘[Closed] Display Shortcode Based on Taxonomy’ is closed to new replies.