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
2answers
254 views

My Gallery Photos are showing in the post's excerpts

I just can't win with this project! All of a sudden, each post's gallery photos are showing up in the excerpt/preview of the post. Each post has a gallery of images that should only be visible on the ...
1
vote
2answers
2k views

How to replace the_post_thumbnail template tag and show the first inside the post image instead

I want WordPress to return the first post image or a default image if no featured image has been set. My theme uses the_post_thumbnail many times, so I don't want to go through and change all ...
0
votes
1answer
628 views

Getting the Featured image URL and inserting it as Custom Field on Post update / publish

I've tried a number of solutions posted here regarding converting custom fields to featured images - of course in reverse; but non seem to work for me. What I'm trying to do is grab the Featured ...
6
votes
3answers
8k views

Get first image in a post

I am using this code directly from the codex. function echo_first_image ($postID) { $args = array( 'numberposts' => 1, 'order'=> 'ASC', 'post_mime_type' ...
-2
votes
1answer
313 views

Front end post or photo or both

I need a help in correcting my code that can front end post or attach image or post&attach image ;) Now I can send a 'post' and 'post with photo' but can't send just a photo, How can I do that? ...
0
votes
1answer
802 views

Apply class to every third list item? [duplicate]

Possible Duplicate: How to mark every 3rd post I'm trying to give a class to every third list item on my page. I know how to give a class to every item, but not to specific items in a row, ...
0
votes
2answers
2k views

Get the 5 lastest Featured Posts from a category

Here is the website http://ariadneswonderland.gr/ that all this concerns. On the homepage I'm using a Drop shadow box plugin under the gallery to show a series of images of featured posts, as of ...
6
votes
4answers
49k views

How to Fix HTTP Error When Uploading Images?

I am using WordPress 3.4.1 on Ubuntu 12.04 using Apache and PHP 5.3.X When I login to the dashboard and add a new post. Then try uploading an image to set as a featured image, I get a red box with a ...
1
vote
1answer
3k views

How to add post featured image to RSS item tag?

I am able to add a post featured image to the RSS feed like so: function insertThumbnailRSS($content) { global $post; if(has_post_thumbnail($post->ID)){ $content = ...
2
votes
0answers
116 views

Featured image upload finished hook

I'm looking for a way to hook into the process of uploading a featured image. Ideally I would want to be able to do some stuff right when the upload has finished, before the thumbnails are generated. ...
0
votes
1answer
422 views

Add body class based on existance of post thumbnail. Code works but receiving PHP Notice

What I'm trying to do is add a body class based on whether there is a post thumbnail. The following works, but I get a PHP Notice. How can I fix the PHP Notice below? function ...
2
votes
1answer
162 views

reference the current category being used in the category.php page

I have this code in my category.php file <?php query_posts( array('post_type'=>'featured' )); $featured = new WP_Query( array('posts_per_page'=>1, 'tax_query'=> ...
0
votes
1answer
751 views

Getting featured image setting as background

I'm using the code below to get the posts featured image URL. I need to be able to get the large size image, right now it's getting the URL to the original size image. <?php $src = ...
0
votes
1answer
418 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
947 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
867 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
9k 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
573 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
138 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
944 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
649 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
122 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
280 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
86 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
984 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
1k 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
614 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
127 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
259 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
863 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
876 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, ...