Saltar navegación

[Resuelto] How to create a shortcode to display a custom field's value

This support ticket is created 4 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.

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 -

Zona horaria del colaborador: America/Jamaica (GMT-05:00)

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Shane 4 years, 9 months ago.

Asistido por: Shane.

Autor
Mensajes
#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?
enlace oculto

Thanks a lot.

#2165733

Shane
Colaborador

Idiomas: Inglés (English )

Zona horaria: 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