trouble with the_post_thumbnail

In your work.php code sample you are calling get_post_meta( $post->ID, ‘the_post_thumbnail’, true) This has nothing to do with WordPress post thumbnails and is looking for a custom field with the post meta key ‘the_post_thumbnail’ For more info see: get_post_thumbnail_id wp_get_attatchment_image_src Post Thumbnails To get the src url of the featured image attached to the post … Read more

Wrap Featured Image in a Link

Unless there’s some part of your problem I don’t grasp, what’s wrong with a simple mash-up of the two given snippets? <?php global $post; $urlbox = get_url_desc_box(); $post_thumb = get_the_post_thumbnail( $post->ID, ‘screenshot’ ); if( !empty( $urlbox[0] ) && !empty( $post_thumb ) ) { echo sprintf( ‘<a target=”_blank” href=”https://wordpress.stackexchange.com/questions/66759/%1$s”>%2$s</a>’, $urlbox[0], $post_thumb ); } ?> Edited: get_the_post_thumbnail … Read more

Missing thumbnails

Seems to me you use a WordPress theme which uses some kind of php library to resize images. You should really use WordPress default add_image_size() and wp_get_attachment_image but if you were the one who created the theme you would already know that. There are 3 things you can do: find a new theme that is … Read more

Editing featured image

You can add image sizes and cropping settings with the add_image_size() function. Call the declared name of your size at the frontend and you’ll have your desired size and crop. The image is stored as an id, you can pick whatever size you want with the the_post_thumbnail() function. PE: the_post_thumbnail(‘medium’); will show the featured image … Read more

Featured Images not appearing

All your issues could be solved with some MySQL queries. Regarding point #1: if you are using mod_rewrite then I recommend using absolute URLs for images in posts, if you are displaying full post content (including its images) on other pages – as you suggest. You can do a MySQL search/replace as follows: UPDATE wp_posts … Read more

I would like my posts to pull my custom cropped thumbnail instead of creating its own thumbnail from Featured Image

If your theme is using the_post_thumbnail() to display the featured image, adding the following code in functions.php file will display the Thumbnail size of the image (as set on Settings -> Media Settings): add_filter(‘post_thumbnail_size’, ‘my_thumbnail_size’); function my_thumbnail_size() { return ‘thumbnail’; } Or you can display the featured image in any width (X) or height (Y) … Read more