Saltar navegación

[Resuelto] Featured Image ID

This support ticket is created 4 years, 2 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 2 respuestas, tiene 2 mensajes.

Última actualización por Ian 4 years, 2 months ago.

Asistido por: Shane.

Autor
Mensajes
#2313571

Ian

I want to be able to output the featured image ID in order to add it to a gallery.

#2313595

Shane
Colaborador

Idiomas: Inglés (English )

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

Hi Ian,

Thank you for getting in touch.

This is something that will require some amount of custom code to achieve.

You should be able to create a shortcode that employs the use of this function below.
https://developer.wordpress.org/reference/functions/get_post_thumbnail_id/

You will pass the ID of the current post in order to retrieve the thumbnail ID.

Please let me know if you're aware of how to do this.

Thanks,
Shane

#2313697

Ian

A simple way to return image IDs seems like it should be a core option.