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)

0
votes
1answer
45 views

Add featured image programatically to custom post type

I am trying to automatically add a video thumbnail from Vimeo or YouTube as the featured image when a new custom post type video is add/updated. The video ID is an advanced custom field. Here's my non-...
1
vote
1answer
49 views

Media thumbnail for custom post inside post content

Some media are added to the post but not inserted into post content. How to insert media into post content without doing it manually. I was able to find the following code to display the attached ...
0
votes
1answer
57 views

Is it possible to preserve original images in order to change image size later?

I want to create a simple wordpress blog site. At the moment I will use a template, but I would like to develop my own afterwards. And I have one concern related to images. Current template has nice ...
0
votes
1answer
35 views

How to change thumbnail default size?

I have added the following code in my functions.php add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 150, 150); My posts display with a thumbnail with the 150x150 dimensions. ...
0
votes
2answers
43 views

Custom field picture instead of post thumbnail on category page

I'm trying to modify a theme to make it work with my custom fields (I'm using ACF for most of the data I put on pages) for a site with song lyrics on it. The original code was this: $...
0
votes
2answers
39 views

Set post thumbnail as background

I have a single page for my products where all products get listed. This is how i've archieved it: <ul class="produkte"> <?php $args = array( 'post_type' => 'produkte', '...
0
votes
1answer
39 views

Why does the Hard Crop option Scale?

I have a number of custom image sizes. I noticed earlier, when I was publishing a new post, that the post image was cropped AND scaled. It is exactly the right dimensions.. but it isn't the portion of ...
0
votes
1answer
75 views

Download button for Featured Image in every post - automatically

I want to add download button for featured image in every post automatically in WordPress with the usage of php files. I don't want to use shortcodes, custom html in every post or plugins, cause I ...
0
votes
0answers
19 views

How to get secondary image on blog page(reading->Posts page:) header

I have using "MultiPostThumbnails" and getting banner for all pages ut not getting for blog page when i have set (reading->Posts page). I have added this code on header. $current_page_banner = ...
0
votes
2answers
80 views

How to change _wp_attachment_metadata specific value in SQL?

i had to resize a lot of existing images in my upload folder (around 1k). After reuploading them, Wordpress of course, doesn't recognize the new dimensions. My approach was to just change the size in ...
0
votes
1answer
37 views

add_image_size not working

I am trying to resize an image using either the following code: add_image_size('poster-full', 450, 9999, false); OR add_image_size('poster-full', 450); I need it to be resized widthwise, and height ...
1
vote
1answer
108 views

Wordpress hook that gets featured image from direct URL?

I use a lot of plugins on my site so I'm trying to minimize the amount more plugins. I was wondering if there's a wordpress hook I can use so that I can use an image that is hosted on imageshack and ...
4
votes
1answer
351 views

the_post_thumbnail responsive srcset not populating with custom image size

I am trying to use the new responsive images feature in Wordpress 4.4 but I keep running into a particular problem when trying to use the_post_thumbnail with a custom image size. It seems I cannot ...
0
votes
1answer
26 views

Troubles with code for upload a image

can someone give me please a code for image upload ? i try many but no one works , this is what i have : $post = array( 'comment_status' => $comment_status, '...
0
votes
0answers
68 views

Featured image does not work with images on a post at the frontend?

[Found a partial solution] I need a little help with this problem. I don't know why on my videos the theme uses a thumbnail and set it as featured image but for images it does not. When I install a ...
0
votes
0answers
27 views

some tweak to a upload featured image code

from three days in a confusing me with this problem , i have a code for publishing a post from front end for images and video, for videos he take the thumbnail and put in featured image but for images ...
0
votes
1answer
44 views

a tricky question about featured image

so i'm trying about 2 3 with this and i can't managed to make it work. I have this theme : Aruna and he has front end post and when i'm posting a image i need to write title and upload a image from ...
0
votes
2answers
87 views

wp_get_attachment_image not to get the post_thumbnaill

I have a setup, where I want to achieve that I have a big Picture of a product (Post-image), and then below a list of other thumbnails, which can be opened in a Lightbox. I made this, by querying the ...
0
votes
0answers
69 views

Featured Image with External Link on click

Hoping someone can help me here, Im trying to edit a plugin which has a custom post type called https://wordpress.org/plugins/custom-post-widget/ On line 110 of the file : custom-post-widget/post-...
-1
votes
1answer
28 views

Display Page featured Image as well as Posts featured Image

Ok, I have hit a bit of a roadblock. I have a page that has been set to display the posts (which have their own featured images). I tried calling the posts featured image in the loop (which worked), ...
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
15 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
23 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
40 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: http://www.foodiefun.net/wp-content/uploads/2016/02/no-...
1
vote
1answer
30 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
48 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
63 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
28 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
56 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
57 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
61 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
36 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
11 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
25 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
166 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
22 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
81 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
81 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
30 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
108 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
16 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
40 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
27 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
39 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
35 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
76 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
11 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 ...