Skip Navigation

[Resolved] Featured Image ID

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Ian 2 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#2313571

Ian

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

#2313595

Shane
Supporter

Languages: English (English )

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