Passer la navigation

[Résolu] How to create a shortcode to display a custom field's value

This support ticket is created Il y a 4 years, 9 months. 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 1 reply, a 2 voix.

Dernière mise à jour par Shane Il y a 4 years, 9 months.

Assisté par: Shane.

Auteur
Publications
#2165651
Editar producto .png

Tell us what you are trying to do?
I created a custom field for woocommerce product. And I want to create a shortcode that allows me to show the value in certain places (like links). So I need to know how to do it.

Is there any documentation that you are following?
I coudn't find

Is there a similar example that we can see?

What is the link to your site?
lien caché

Thanks a lot.

#2165733

Shane
Supporter

Les langues: Anglais (English )

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

Hi Damian,

Thank you for getting in touch.

If this field was created using our Types plugin then you should be able to display it by using this shortcode below.

[types field='my-field'][/types]

Where my-field is the slug of your custom field.

Thanks,
Shane