Post Thumbnail is a theme feature introduced with Version 2.9. Thumbnail is an image that is chosen as the representative image for Posts, Pages or Custom Post Types.

learn more… | top users | synonyms (1)

1
vote
1answer
13 views

Randomly Assign an Image's Alt Text Based on Data From Post

I would like randomly assign an image an alt text based on taxonomy entered by the user on a post that the image is attached if there is no alt text entered. For example, on a post that has an image, ...
1
vote
1answer
13 views

Output post thumbnail (add class)

I'm using the following to output the post thumbnail as a marker on a map. $thumb_id = get_post_thumbnail_id(); $thumb_url_array = wp_get_attachment_image_src($thumb_id, array( 100, 100), true); ...
0
votes
1answer
21 views

retrieve custom post image through widget

My custom post has featured image. I need to retrieve it through widget. I am using get_the_post_thumbnail. But it is not working. Except this the rest of the widget is working fine. Here is the ...
0
votes
2answers
35 views

It does not work concatenation in function.php

I want to put a variable between two tags, but it puts him out. This is my function: (function.php) /* traer thumb */ function item_thumb() { global $post; if (has_post_format('video')) { ...
1
vote
1answer
20 views

How can I use a static (ish) URL for the featured image for a post?

I want to store all my featured images on S3, and then use imgix transforms to display them. So basically, instead of Wordpress inserting: ...
1
vote
1answer
29 views

Filter post_type thumbnail in Search result

it's my first question on Stack network so let me know if something wrong in the use of this. I have a theme with these pieces of code: /** * Get the Featured image URL of a post * @global object ...
1
vote
2answers
45 views

Different excerpt styles per category, but chronological

I want to have different sized previews for different kinds of work I've done. Say 100x100px for regular stuff, but 200x200px for a bigger project. I figure I can use category to sort, and I know how ...
-1
votes
1answer
51 views

How to force regenerate thumbnails in Wordpress posts?

We recently changed themes. The new theme uses different dimension thumbnails and I was a bonehead and deleted all previous thumbnail sizes. Deleting the thumbnail sizes results in many of the images ...
1
vote
1answer
26 views

How to replace images?

I seem to have a problem with editing and replacing images in Wordpress. Do they automatically replace the image if it has the same file name or is a new file name(copy) always created? Also if I ...
1
vote
1answer
52 views

Else condition not working while using has_post_thumbnail

I've been trying to develop a recent posts widget which will display my most recent posts in sidebar. I am trying to display default "ft-thumb.jpg" image if there is no post thumbnail but its not ...
1
vote
1answer
52 views

How to set an equal image size for a Fallback Image as used for the Featured Image(dynamicly)

I have set a new size (width/height) for Featured Image and have also set the option to use a Default Image(Fallback image). The size used for the Featured Image: 1170/550 , the size for the Default ...
1
vote
1answer
41 views

Retrieve posts using thumbnail id as meta key

I am working on my website and using these args in wp_query but I also want to show only those posts which have thumbnails in it... here are the args I am working on: $args1 = array( ...
0
votes
0answers
33 views

featured image rss feed in a category

I want to get the featured image in my RSS feed in a specific category. With the principal rss feed mywebsite.com/feed , I have no problem. Featured images are displaying. When I want to create a rss ...
0
votes
0answers
10 views

How to fix the format of entry pages with thumbnail images?

I am trying to make the entry posts with a thumbnail image to the left, and title above the excerpt of the article to the right of the thumbnail, but aligned with it. Currently, the thumbnail is below ...
1
vote
1answer
23 views

Post body text occupying featured image space before it loads

I am wondering if there is a way to prevent my posts body text to occupy my featured images space before it gets loaded. When I go to some post the post content is right bellow my post title until ...
1
vote
2answers
118 views

Change size and crop medium_large images

I use events manager pro plugin to show an eventslist. These event-list is showing their thumbnail image in the new (wordpress 4.4) wordpress image size "medium_large" (width 768px). I need an image ...
1
vote
0answers
20 views

How to update the values when the featured image has changed?

I'm trying to implement this function. It saves in the database the dominant color of the image uploaded as featured image in a post. It's working perfectly BUT the problem is that it only works when ...
2
votes
1answer
69 views

Add colorpicker to featured image

I'm trying to add a colorpicker to the featured image meta-box. Here is some background: I use the featured image meta-box to place parallax background images. Because a user is allowed to place text ...
3
votes
1answer
56 views

Add options to featured image

I want to add an option to the featured image metabox. I have found a way to do this here The problem I'm having is saving the value tot the database. Here is what I have tried: add_filter( ...
1
vote
0answers
28 views

Using custom image resizing script in a page

I am using the aqua-resizer to create custom image sizes and cropping. However, I am also using a theme with a built-in page editor and module-based layout. I am able to get the aqua-resizer script ...
0
votes
0answers
14 views

Feature image cropping issue

When I am uploading any image to set as background on my homepage it gets cropped automatically. I am using attitude theme for the site. What settings shall I change to have the complete image as it ...
1
vote
0answers
27 views

automatically set “Featured Image” the same as the og:i that is set in a custom field

I currently have a site that uses the "custom fields" feature to set the value of the meta property="og:image" for each post. All of my og:images are stored on an external server. I'm looking for a ...
0
votes
1answer
94 views

Fit image to Thumbnail canvas size

I need to upload images with differrent orientation (portrait and landscape) and I don't want to crop post-thumbnails. But I need always thumbnail size 250x250px. If I upload portrait oriented image ...
1
vote
0answers
15 views

Fixing image names for a site being restored

Fixing image names for a site being restored The WordPress site went down last week and is being restored. When a image(image1.jpg) was uploaded a week ago using the back-end of WP, it likely was ...
0
votes
0answers
38 views

Compression of original picture during upload?

WordPress compress scaled thumbnails of image during upload, but, original image will be is same quality. I am trying to compress original image too. I wish to make image in original resolution ...
1
vote
1answer
21 views

Get post thumbnail from subpages with a foreach loop

I have created a page that loads content from it's subpages. The subpages contain post_thubnails. I use a foreach-loop to get the content of all pages. I just can't get the images loaded. <?php ...
0
votes
2answers
38 views

Retrieving featured image on static blog posts page

So I've set up my site to use static pages for the front page and the posts page. Now I'm creating my posts page template. I wanted to grab some content from the actual page I made for the posts page ...
0
votes
1answer
28 views

wp_get_attachment_metadata()['image_meta'] fetch WP metadata or EXIF?

wp_get_attachment_metadata( get_post_thumbnail_id( get_the_ID() ) )['image_meta']['credit'] returns nothing although there IS information in the attachment's credit field. Is ...
2
votes
1answer
67 views

Get original image from thumbnail URL

I am using a method to find the first image included in a post's content to display as it's thumbnail (a little hacky, but it works). However, some authors add small sized images, and since this ...
0
votes
0answers
10 views

if the image is smaller than the thumbnail, create anyway the thumbnail [duplicate]

I noticed that wordpress does not allow generating thumbnails if thumbnail size exceeds the size of the original image. Is there any way to prevent this? Bfi_thumbs plugin generates the thumbnail ...
0
votes
1answer
49 views

Use thumbnail image using url of that image

I have the URL of my image and I want to display the thumbnail of that image. Is this possible. I check the_post_thumbnail() function but I can't add the URL of the image as an input.
4
votes
1answer
803 views

The the_post_thumbnail without srcset?

The WordPress 4.4 adds multiple image sizes with srcset when using the_post_thumbnail function. Is it possible to get only one image size without srcset ? I understand that it is possible to add a ...
1
vote
2answers
54 views

How to access featured image?

I saw this code as how to set a featured image for a post: // required libraries for media_sideload_image require_once(ABSPATH . 'wp-admin/includes/file.php'); require_once(ABSPATH . ...
0
votes
2answers
41 views

Wrap post thumbnail with <figure>

I'd like to wrap my post thumbnail with <figure> tags. I have tried the following and the image appears, but the <figure> tags come up empty. <?php if ( has_post_thumbnail() ) { ...
3
votes
1answer
97 views

Featured image shortcode

Each post currently requires the featured image to be duplicated within the post several times. Is there any way in which I could dynamically call the featured image back into the post rather than ...
1
vote
1answer
44 views

Insert Featured image from Feed

I am importing products through a feed programmatically as follows: $request = wp_remote_get('myapiurl'); $response = wp_remote_retrieve_body( $request ); // decode the json $json = ...
0
votes
0answers
20 views

White Blank screen and issue to get thumbnail in

<section id="container" class="one-column"> <div id="content" role="main"> <div class="gridBox"> <div class="boxes-container"> ...
0
votes
2answers
76 views

Icon over thumbnail according to post format

How would I go about adding icons over post thumbnails according to their post format. So for example if I have a post with a post format of audio the thumbnail would show everywhere(widgets, category ...
1
vote
1answer
59 views

How to generate a featured image from a video embeded in a metabox

I have a metabox that allows me to add videos from Youtube and Vimeo on posts with video post format. I am now looking into automatically generate thumbnails for these post with video post format. ...
0
votes
2answers
209 views

add_image_size not working with the_post_thumbnail

Code in my funcitons.php function custom_thumbs() { add_image_size( 'cover-size', 1600, 450, true ); } add_action( 'after_setup_theme', 'custom_thumbs' ); Usage: echo ...
1
vote
1answer
28 views

What is the standard featured image size?

Is there a standard featured image size that Wordpress works best with? Or is the featured image sizing based on theme settings or requirements?
-1
votes
1answer
118 views

Featured image as background in a div using headway

I'm using Headway Theme (builder) and I've got static pages for products. On top of page is a wrapper that I'd like to use the featured image as background. Everything I've read is that I need to ...
0
votes
1answer
38 views

Disable loading Thumbnail On Mobile [closed]

I am looking for a script or plugin that disable loading thumb in mobile browser but load thumb on desktop browser. Clearly, in a wordpress website, if I visit a website in desktop browser then ...
0
votes
1answer
94 views

WordPress 4.4 <picture> responsive sometimes doesn't work

When WordPress 4.4 was released, it added the ability to make your feature images responsive using the picturefill JavaScript libraries. Is anyone else having problems with the <picture> tag? ...
2
votes
1answer
41 views

Cannot get full thumbnail size using the_post_thumbnail

I cannot get the full (unmodified) image size using the_post_thumbnail( 'full' ); I have also tried: the_post_thumbnail(); It still returns the cropped image. I can see that the unmodified ...
1
vote
1answer
50 views

How do I get a random image from subset of images in media gallery?

If a custom post does not have a featured image, I would like to grab an image from the media library to use in place of the featured image. These particular images wouldn't be attached to any ...
1
vote
1answer
248 views

How to use wp_get_attachment_metadata for thumbnails

I would like to add the right rich text snippets so that the Goole Structured Data validator will pass all the code I have. The only things missing are the sizes of the thumbnails. This specific ...
0
votes
1answer
31 views

How to get the real thumbnail size?

I am trying to find the real thumbnail size of the posts. In my blog in the past years I was uploading images (and thumbnails) of 600px width. At the beginning they were even smaller. In the last ...
0
votes
0answers
17 views

Multiple Images from a Featured Image (ie, additional product photos)

I need help coming up with a solution or even deciding if it is possible. I would like to provide multiple images (closeups) of a featured image (large one) as detail photos... without having to ...
0
votes
0answers
30 views

Add woocommerce category thumbnail to the other taxonomies

Woocommerce by default includes category images, shown in the left column of the below image: I have added my own custom taxonomies and I'd like to extend this functionality to them. At present ...