Hot answers tagged post-thumbnails
Facebook scrapes your pages for images to go along with the post you share. When it finds an image on the page it will use that. To specify which image exactly you have to use Open Graph tags in the head part of you html page. The og:image tag in particular: <meta property="og:image" content="http://graphics.myfavnews.com/images/logo-100x100.jpg" /> ...
I think you want to use the added_post_meta hook instead of updated_post_meta because you're not updating the meta here, only adding it. At least in the case of the _thumbnail_id, where we must delete it before adding it again (no update) through the admin UI. Investigating this further we see that this part of the update_metadata() function: if ( empty( ...
If you read the documentation that you have linked to, you would see that the post ID is stored in the array key post_id and not ID. You should then change get_the_post_thumbnail($popular_post->ID, 'wpbs-featured-full'); to get_the_post_thumbnail($popular_post['post_id'], 'wpbs-featured-full');
Enable Debugging WordPress has constants defined in wp-config.php where you can print errors to the screen and log them in a separate file located /wp-content/debug.log. It looks like this: define( 'WP_DEBUG', true ); define( 'WP_DEBUG_DISPLAY', true ); define( 'WP_DEBUG_LOG', true ); You can then print your own information to the debug log at specific ...
This is a working example that hooks into the add / remove events for a post thumbnail. It also includes the meta key required for the Secondary thumbnail created by the MultiPostThumbnail. Help for this solution came from here and the MultiPostThumbnail docs. birgire gives a good explanation about these hooks in the accepted answer. // Initialize the ...
It looks like there's something wrong with the images or the media path WordPress is using to search for the files. Try taking a look at your FTP and check if the path is correct and all the files are OK.
The easiest way would be to do away with the content.php file for this template and move everything to your single-thumbnail-featured.php so you don't mess up any other pages using content.php. Then I would simply move the_post_thumbnail() outside the col-md-8 into a full width col-md-12. single-thumbnail-featured.php //Loads the header in which there is ...
Only top voted, non community-wiki answers of a minimum length are eligible