Duplicate Snippet
Embed Snippet on Your Site
Shortcode to show Thumbnail
Show the featured image anywhere in the post by using [thumbnail].
php | |
| <?php
|
| add_shortcode('thumbnail', 'thumbnail_in_content');
|
|
|
| function thumbnail_in_content($atts) {
|
| global $post;
|
|
|
| return get_the_post_thumbnail($post->ID);
|
| }
|
| |
| |
Comments