Passer la navigation

[Résolu] Display Toolset shortcode in Woo/Elementor template

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

Display taxonomy term custom field on product archive created with elementor.

Solution:
In a case like this you will need to retrieve the field value directly by using the shortcode method to get the value.

[types termmeta="my-audio-field"][/types]

Where my-audio-field is the slug of the custom field that you want to retrieve the value for.

This support ticket is created Il y a 2 années et 10 mois. 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Fuseau horaire du supporter : America/Jamaica (GMT-05:00)

Ce sujet contient 6 réponses, a 2 voix.

Dernière mise à jour par kristofG Il y a 2 années et 10 mois.

Assisté par: Shane.

Auteur
Publications
#2447011
Screenshot_9.jpg
Screenshot_8.jpg
Screenshot_7.jpg

I am using WP Carousel lien caché to create an image carousel for every Woo product category.
When I insert their shortcode in the actual product category description, the carousel works fine.
However, I need to make this more dynamic and I also need to display the carousel outside of the product category description, so I created a Toolset custom field that appears on Taxonomies: Product categories
But when I create my Elementor product category template, that Custom Field is not available in the dropdown.

#2447085

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Kristof,

Thank you for getting in touch.

I suspect that the elementor template you're creating is for a post type and not a taxonomy archive. If such is the case then you won't have access to the Taxonomy meta fields unless you're building an archive that is listing out the taxonomies.

So the term meta fields are only accessible on Taxonomy archives and views that are listing out taxonomies.

Thanks,
Shane

#2447105

Actually it's a Products Archive linked to the Instance: Product categories, so I would assume it's a taxonomy archive?
I tried with a simple Elementor Archive, but that does not offer more options.

Is there another way to link the unique WP Carousel shortcodes to the corresponding Woo category?

#2447111

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Kristof,

Unfortunately the Product Archive isn't a taxonomy archive. The only way I see this working is to continue using the description field that is on the taxonomy.

Also you can double check with the elementor support team to see if Taxonomy custom fields are supported by their dynamic content option.

Thanks,
Shane

#2448649

Hi, we are using a Category archive not a Product Archive, unless a Category archive becomes a Product Archive once you use the Elementor Products Archive widget, I'm not sure but to me it seems like a Taxonomy archive.

#2448703

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Kristof,

If the field isn't there then it means that elementor may not support them

What you can do is to use the shortcodes to retrieve the field themselves here is an example.

[types termmeta="my-audio-field"][/types]

Where my-audio-field is the slug of the custom field that you want to retrieve the value for.

Thanks,
Shane

#2448719

My issue is resolved now. Thank you!