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
408 views

Autogenerated Thumbnail compression depending on size

This is a follow up to this question, in witch the jpg compression is altered depending on what WP's built-in image resulting image size returns. While it may work for most of the people, i'm looking ...
1
vote
1answer
924 views

Archive show thumbnail

I want to show thumbnails next to my posts in archive page, however it only shows thumbnails if the posts has a featured image. So I want to show thumbnail for the image attached to the post, but I ...
2
votes
3answers
2k views

How to change the height of featured image in Twenty Eleven child theme

I am trying to change the height of my featured image to 350px in my child theme for Twenty Eleven. Can anyone help?? Note: I am using Twenty Eleven and there is no functions.php file in my child ...
2
votes
3answers
4k views

Add post title as alt tag for featured image

How do I add post title as alt tag in a post? I tried using array(title => '.the_title.') but it didnt work. I think I am not suppose to use the_title. I tired using get_the_title as well. Thanks
1
vote
1answer
7k views

How to display a post's Featured Image with this code?

so this is sort of a continuation of another question that I had to ask recently. I wanted to start another conversation, since technically my last question was answered. The last question is here: ...
0
votes
1answer
857 views

How to make excerpt image be full size instead of thumbnail?

Now when I have excerpts on the home page the image is a small square, but I'd like to change it to a fill the entire width of the content area. (as if the image was in a post.) My theme is responsive ...
1
vote
1answer
8k views

How do you add thumbnail support for custom post types?

the thumbnail support is working for post, but I have another post type called product and it is not working for this. I am trying: add_theme_support( 'post-thumbnails', array( 'post', 'product' ) ); ...
4
votes
2answers
9k views

Display Post Thumbnail Without Being Featured Image

I'm hoping that I can explain what I'm going for here. On my current project's main page, I'm displaying each post's Featured Image Thumb, along with an excerpt of the post's content. In each of the ...
5
votes
2answers
1k views

New image size version only for the Featured Image file

I'm worried about too many files created when adding a new image size. All uploaded files will generate the new size, I need a specific image size only for the file set as Fetured image, is there ...
0
votes
1answer
562 views

Why use foreach to get attachment_id if numberposts is equal to 1?

I needed to pass an image to a Pinterest plugin in posts without a Featured Image so I wrote a little function to get the id of the first picture in a post. This code is in the loop-single.php where ...
2
votes
1answer
4k views

Convert uploaded PNG to JPEG automatically

Is there a way to convert automatically uploaded PNGs to JPEGs and keep the original? In other words, let the user upload a PNG, but show in wordpress (thumbnails, large, medium, etc) the JPEG version ...
-5
votes
1answer
137 views

MIssing feature image link function

I need to be able to add a feature image to a post as a link. The link is good, it's green check. And no i cannot upload the file and insert into post dont do anything good. I have the link to the ...
3
votes
2answers
2k views

How to display the_post_thumbnail if a post has one or otherwise display the first image in a post?

I would like to create a condition that checks to see if a post has a thumbail and if it does display it, otherwise display the first image in a post. I tried something like this in my loop.php but ...
0
votes
2answers
4k views

Set first image (external) as featured image / thumbnail

I've read through a lot of code snippets now and it seems like wether I'm to stupid or there is no solution for this. I have a setup where some information for a product is loaded via amazon API if I ...
0
votes
1answer
1k views

Display thumbnails for certain category posts

I have wondered about the web and came across this beautiful piece of code: if(has_post_thumbnail()){ the_post_thumbnail(); }else{ echo '<img src="' . get_bloginfo('template_directory') ...
1
vote
1answer
924 views

Image still attached to post even after removing it as featured image

I'm sorry if this is too noob of a question, but when I upload an image and set it as the featured image then later remove it (as featured image), the media list still shows it's "Attached to" the ...
1
vote
1answer
108 views

Aligning the thumbnail image

I want to control the alignment of the featured image(the thumbnail) with the options given in the 'Set featured image' pop box. <?php if(has_post_thumbnail()) { echo '<div ...
0
votes
2answers
630 views

trouble with the_post_thumbnail

I'm trying to create a portfolio page that will display a series of thumbnails and, when clicked on, will go to single.php. The code I'm using below seems to work in that when I click "see more" it ...
0
votes
2answers
119 views

How can I scale down the width of images in bulk that are embedded in posts throughout the site?

I am building a new WordPress theme and it is quite different from my current theme. Currently the dimensions of my images are much wider than how I would like them to be for my new theme I am ...
0
votes
1answer
274 views

Add filter on certain thumbnail sizes only

How to run this filter only on some specific registered thumbnail sizes '$size' ? like 'large' , 'medium' .... add_filter( 'wp_get_attachment_image_attributes', ...
2
votes
1answer
1k views

Can a thumbnail of an animated gif be animated?

I have an animated gif I want to show in two places, having two different sizes. I am creating two sizes in my functions.php, using add_image_size( 'small-feature', 500, 300 ); add_image_size( ...
0
votes
1answer
84 views

add_filter with specific thumb names

How would I run add_filter only on some specific registered thumbnail sizes '$size' ? like 'large' , 'medium', etc?
0
votes
2answers
3k views

Setup A Default Featured Image

I'm trying to setup a default fallback featured image on my website to ensure consistency with images being displayed for every post, even when an image is not embedded in the post. I've tried a ...
1
vote
3answers
4k views

Can't get image size set with set_post_thumbnail_size() function

I have a problem with set_post_thumbnail_size() function, which seems it doesn't work. Or at least it doesn't work correctly. I have set a thumbnail size 75x75px in WordPress settings under the media ...
0
votes
1answer
970 views

show all the posts thumbnails

I want to display all the posts by the featured image of each post. Is there a shortcode or can you give me some tips on how to achieve this ? Thanks!
1
vote
1answer
1k views

Wordpress fails to auto crop featured images

I set 2 crop sizes in the functions.php file. // Setup Post Thumbnails // ----------------------------------------------- add_theme_support('post-thumbnails'); add_image_size('imagePost-thumb', 970, ...
1
vote
1answer
107 views

How do you create a custom template to display a category with an image and related posts below?

I am trying to create a custom template that can give the following effect... Category Name A (with image) post with category name A post 2 with category name A post 3 with category name A ...
0
votes
1answer
970 views

the_post_thumbnail with lazyload JQ plugin

I need to modify the_post_thumbnail function to run "Lazyload" on it, i think there is two solutions : 1- modify the args to be something like this the_post_thumbnail('product', ...
0
votes
2answers
607 views

Different thumbnail size than actual picture in post

I am wondering how to achieve something specific. I am not sure if this functionality is already built into Wordpress, or if there is some PHP happening. This is the site I am basing some of my ...
0
votes
1answer
125 views

thumbnail image path and file path for gallery thumbnail images

what is the thumbnail image path? When asked for the file path for the gallery thumbnail image, what is needed? the terms: thumbnail image path and file path is not familiar to me.
0
votes
1answer
165 views

Can't change image size from post “Show current page featured image in sidebar”

I added the exact code that you offered in the post Show current page featured image in sidebar. The featured image is displayed, but the size of the image is unaltered from the original. I am ...
0
votes
1answer
43 views

Wanting to apply different featured images for each post

This is my first wordpress website here and so far it'll looking good. The only thing I have left that I just can't figure out is the featured image for my blog page. I have set the main blog banner ...
0
votes
1answer
2k views

How to display thumbnail + tags + title of a child page?

What do I need to do to display thumbnail + tags + title of a child page? [ Thumbnail ] [ Title ] [ Tags ] Thanks! EDIT: Well this work, but only showing thumbs+title... it shouldnt be too ...
3
votes
3answers
1k views

Set Featured Image programmatically (in admin) with JavaScript?

I'm trying to set the post thumbnail (featured image) with javascript from an existing image in the media gallery. I would consider a php-based option too I suppose (one that would require clicking ...
0
votes
1answer
256 views

WordPress save thumbnail but don't show it [closed]

WordPress don't show image thumbnail but save them. I have all version of image (eg. image.jpg, image-300x250.jpg) but WordPress don't detect them. Anybody got same problem as here?
0
votes
2answers
835 views

Filter for post_thumbnail: link to small src and add data-attribute [duplicate]

I wonder how I can link manually to the smallest filesize for the_post_thumbnail() within its filter function … add_filter( 'post_thumbnail_html', 'post_thumbnail_html', 10, 3 ); function ...
-1
votes
2answers
854 views

Carousel Hover Image

I a using an image carousel to display some pictures on my website. The carousel I am using is called: Jcarousellite (http://www.gmarwaha.com/jquery/jcarousellite/). I have the carousel setup, styled, ...
0
votes
1answer
238 views

post preview/thumbnails not displaying correctly- linking to “home” instead of post?

Live site In the lower portion of the landing page, I'd like there to be three blog post previews- just the headline and thumbnail for the three most recent posts. I'm using the following code: ...
0
votes
1answer
327 views

Plugin scans for images in post_content, how about “featured image”?

I use WordPress SEO by Yoast, especially for the Google News sitemap feature. My theme is coded in such a way that the main image of a post is also the featured image of the point (i.e. the same ...
0
votes
1answer
97 views

Thumbnail images

Is there any way to auto-generate a 150x150 thumbnail image for each post based on the post's selected featured image? This would be preferable as opposed to manually going into each post, copying ...
0
votes
2answers
481 views

Posts Page Featured Image [closed]

I have created a theme that uses a featured image on every page. In settings, I have setup my "Posts Page" to be "news"...how do I get the featured image from "news" to display? The following will ...
0
votes
1answer
369 views

Extract featured image from link mentioned in blog post

You ever notice Google News has relevant images associated with its headlines? How can I use WordPress to extract a featured image from an external webpage referenced in a blog post (or custom ...
0
votes
3answers
962 views

Using thumbnail functions inside a shortcode

I'm trying to figure out why WP doesn't seem to recognize functions like get_the_post_thumbnail() inside a shortcode loop. For example, tried adding it to a fresh theme / plugin-less installation. ...
0
votes
1answer
407 views

Automatic adding thumbnail to post

I have got following code. $postData = array( 'post_category' => array(get_category_id("website")), 'post_content' => 'My website about cars.', 'post_title' => 'my little cars', ...
7
votes
2answers
974 views

Set custom name for generated thumbnails

Is there any filter available to set the naming convention of those auto generated thumbnails? Something like this: thumbnail_150x150.jpg -> thumbnail-s.jpg thumbnail_300x300.jpg -> ...
1
vote
2answers
8k views

How come Featured Image isn't showing up in my Custom Post Type?

I have thumbnail support added with the following in my functions.php // Add Thumbnail Support add_theme_support('post-thumbnails'); set_post_thumbnail_size( 140, 140, true ); And I create the ...
1
vote
2answers
736 views

Filter For Featured Image

Is there a filter for when a Featured Image is set/unset or changed. I need to delete transient data when the above occurs.
5
votes
1answer
954 views

How to add multiple image sizes of the same size with add_image_size

I'm using a grayscale filter on all uploaded images in my WordPress installation. However I want both the gray scaled image and the colored image in my website (colored on hover). The way I tried to ...
0
votes
2answers
2k views

Show different size featured images (the_post_thumbnail) for 1st, 2nd and 3rd posts?

I file all the galleries on my blog under the 'gallery' tag. I use the following code (via) to display the latest 7 gallery posts after the 8th latest post on home page: <!-- Featured post ...
2
votes
1answer
196 views

Why are extra 92 pixel square thumbnails created?

Disabling this WordPress feature which automatically generates various sizes of an uploaded image, is normally as simple as going to WordPress Dashboard > Settings > Media screen and changing all ...