Navigation überspringen

[Gelöst] Featured Image ID

This support ticket is created vor 4 years, 2 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 -

Zeitzone des Unterstützers: America/Jamaica (GMT-05:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Ian vor 4 years, 2 months.

Assistiert von: Shane.

Author
Artikel
#2313571

Ian

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

#2313595

Shane
Unterstützer

Sprachen: Englisch (English )

Zeitzone: 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.