Exposes two new functions theme developers can use to retrieve information about a post's featured image, such as the caption or description.
Thumbnail Field's purpose is simple and straightforward: It creates two new functions,
get_thumbnail_field(), to facilitate retrieving information from a post's featured image, such as the title, alt, description, or caption. Theme and plugin developers are welcome to strip these functions out of this plugin and use them directly in their work, or require this plugin.
In keeping with WordPress style,
the_thumbnail_field() echoes the field value, whereas
get_thumbnail_field() merely returns it.
Both functions take up to three arguments, all of which are optional:
Thus, outputting the description for the featured image of post ID 45 would look like this:
<?php the_thumbnail_field( 'description', 45 ); ?>
Installing this plugin will make no visible changes to your WordPress admin.
Requires: 3.5.0 or higher
Compatible up to: 4.3.6
Last Updated: 2 years ago
Active Installs: 20+
Got something to say? Need help?