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)

3
votes
4answers
2k views

How can I display my featured image correctly inside my single posts?

Here is what I have tried: 1) Added add_theme_support('post-thumbnails'); in functions.php. 2) Added <?php the_post_thumbnail(); ?> inside single.php which looks like this: <?php /** * ...
0
votes
1answer
213 views

add featured image dialog box disappear

I have a test site here (with WordPress 3.2.1) Since I activate the multisite support, the add featured image disappear. I try to deactivate all the plugin and activate the default theme (twenty ...
1
vote
0answers
102 views

Export xml use/import images from theme directory

Is it possible to create demo.xml for a theme that when imported into fresh theme installation will use/import images from theme directory folder (e.g. theme/images/demo) rather than import media from ...
0
votes
0answers
87 views

Get source from the_post_thumbnail

I'm struggling because I'm using the "Sitewide Tags"-Plugin to grab all posts in a network to the main blog. Now I want to embed the post images to the main blog and the only function you're able to ...
0
votes
1answer
66 views

Assign SQL 'post_thumbnail' column as featured image

I have added a column called post_thumbnail to my wp_posts table. Is there any way I can make post_thumbnail to each post's featured image?
0
votes
1answer
60 views

Add 'if exists' to filter

This almost perfectly fixed an issue I had: How do I add the featured image to the_content after the first paragraph? However, if there isn't a featured image, the code still outputs a blank <img ...
0
votes
0answers
195 views

Random Featured Image based on sub-category

I have this code below for adding a random Featured Image to a post in WordPress based on a category. (Thanks to G.M. on this WPSE post) I have two questions about it: First Question: It is ...
0
votes
1answer
303 views

Random Featured Image Based on Category

I am looking to extend the below code to select a random featured image based on a specific category. The below works but uses an overall list of images to pull from vs a list of images based on ...
0
votes
2answers
29 views

add_theme_support not outputting thumbnails

so, i wanted to thumbnails in my query and i came across add_theme_support, it says you have to have that to enable actions such as thumbnail, so i put the following in my functions function ...
0
votes
1answer
505 views

how to resize thumbnail image

I am using this function to re-size my thumbnail , add_image_size( 'portfoliolarg', 120, 120, true); the image is corp and resize I just want to resize my Image
0
votes
1answer
41 views

Thumbnails for custom post not showing up in query

My thumbnails are not showing up in my custom post type when I do a query, however they show in the single.php file. I have added 'supports' => ...
0
votes
1answer
116 views

Change get_post_thumb responsively?

How can I responsively change the get_post_thumb when reaching a certain breakpoint with PHP code? I use the following code to print my posts thumb at the moment: <?php echo '<div ...
0
votes
0answers
66 views

Is it possible to upload multiple images via Media Library tab in Thickbox I've created?

I have a meta box upload button and I want to upload multiple images using that button. Firstly I enqueue required scripts: add_action( 'admin_print_scripts-post-new.php', 'mycpt_admin_script', 11 ...
0
votes
1answer
75 views

the_post_thumbnail do 2 queries. How to optimize

I have query: <?php $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'orderby' => 'post_date', ...
0
votes
1answer
60 views

preg_replace not removed “class”

Use this code to remove the label "class" of the images, but does not work. The label does not disappear in the new post. function the_post_thumbnail_remove_class($output) { $output = ...
0
votes
1answer
204 views

featured image problem with custom post type

I created a new custom post type based on the code provided by the wordpress codex. But when I try to set a featured image it returns and shows -1 in the featured image box instead of the images. I ...
3
votes
2answers
85 views

Change wording of default thumbnail metabox

I want to change the wording in the Default thumbnail metabox to 'Set default thumbnail' instead of 'Set featured image'. How can I do this?
1
vote
1answer
81 views

Watermark featured image as soon as it is set on post edit page

I want to watermark featured image of specific category when featured image is set on post edit page. I made a small script which watermarks but how can I know that featured image has been set so that ...
0
votes
1answer
55 views

Make thumbnail from uploaded image without plugin

When I add image in post, I need to make some thumbnails with several sizes. Maybe someone could tell action or filter to implement this?
0
votes
1answer
87 views

cant output grayscaled ive created using add_image_size

I am trying to create a gray scaled image of the image i upload. I have been able to upload the image and create the gray scaled version by using this code: ...
0
votes
1answer
144 views

Only create image size when used in featured image

I'm using a post thumbnail size and I was wondering if there is a way to setup so wordpress only make the thumbnail size when the image I upload is used as the featured image rather than for every ...
1
vote
2answers
65 views

How to offset thumbnails to the center?

I made few thumbs size. But some of them make total resize of original pict or make new with specified sizes from right bottom corner. Is this posible to centrilize thumbs? I meen to make new thumb ...
3
votes
1answer
2k views

Programatically creating image attachments from local URLs and setting featured image

I'm currently working on importing an MovableType blog into WordPress. The blog has several thousand posts, and each post has an image associated with it. The export file contains references to each ...
0
votes
2answers
73 views

Wordpress auto picking featured image

In the past when I created a news post, the featured image was automatically assigned to the post when I uploaded an image in the post. But now, that doesn't work anymore :( The only thing that ...
1
vote
3answers
685 views

Download an image from a webpage to the default uploads folder

I am writing a custom theme/site in which I need to download images programatically from certain webpages to the upload folder and then insert them as part of the post. So, I was able to find the ...
1
vote
1answer
124 views

upload or auto setup feature photo by user avatar

I want user avatar image is set as a feature image, If there is no featured image. I am trying to do like this. function auto_featured_image() { global $post; if (!has_post_thumbnail($post->ID)) ...
0
votes
1answer
154 views

Custom header image, and content, on Posts Page in twentyeleven with Static Front Page

I'm new to Wordpress, so sorry if I've missed something obvious. I have a site using (a local child of) the twentyeleven theme. I've found that if I set Featured Images on pages and posts, then that ...
0
votes
1answer
208 views

Featured image in admin on custom post type

I followed this tutorial to getting featured images to show in the admin menu on posts. I wanted to be able to see what article had a featured image and what it looked like without having to actually ...
4
votes
3answers
6k views

Multiple featured image thumbnails for post types (Multiple Post Thumbnails plugin)

I found a plugin called Multiple Post Thumbnails and followed the directions in getting it set up. Everything shows up correctly in the admin dashboard (i.e. shows two sections to upload two separate ...
0
votes
1answer
58 views

How to allow the user to add an arbitrary amount of post thumbnails

I already installed Multiple Post Thumbnails. However I would like to allow the user to decide how many images he associates with the post (or rather page in my special case). I could of course just ...
0
votes
1answer
437 views

How to use images uploaded with custom implementation of thickbox like the_post_thumbnail() functionality

I have create a custom post type with meta boxes. In metaboxes I have create some fealds that the use can use the WordPress ThickBox Media Dialog to upload his/her images for each post seperatly. ...
0
votes
1answer
253 views

How WordPress attaches its Featured Images with posts?

I'm working on a WP_Query(), where I'm trying to fetch all the images using 'post_type' => attachment and 'post_parent_in' => array( 1688 )(I want to pass some more post_ids) along with other ...
0
votes
1answer
282 views

3 random images from custom post type, each in a div with a diffrent class

I'm trying to build a loop using query posts to display 3 featured images from the custom post type 'portfolio'. My problem is that each picture has to be in a div with a diffrent class, so i was ...
-1
votes
1answer
37 views

add if statement to the featured image

I have a featured image. I want to add an if statement to the size. For example, if the featured image height exceeds 500px I want to add something. Is that possible ?
0
votes
1answer
498 views

Is it possible to add the_post_thumbnail to style.css?

I'm wondering if it's possible to add the_post_thumbnail location to style.css. I'm using these images as backgrounds, and I can easily do that on the template, of course, but I'm thinking that for ...
0
votes
0answers
87 views

6 Recent post on front page with either featured image or content image

In my frontpage.php i want 6 recent blogs with either featured image or the first content image, and if these are not available then i don't want to show that particular post. But i am not getting the ...
1
vote
3answers
3k 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 ...
1
vote
1answer
38 views

How do I turn a post thumbnail into a background image?

I believe the answer o this question was posted on this page, but it is still not clear to me. The snippets are scattered all over the discussion and several glitches happen when I implement them.
2
votes
3answers
3k views

How to set featured image to custom post from outside programmatically

I am trying to fetch and insert images outside the wordpress environment to a custom post via PHP. How to move/upload that image to wordpress upload directory year date folder format just like ...
0
votes
0answers
148 views

Updated WordPress and now image crop, thumbnail setting and thumbnails are gone

I've updated to WordPress 3.7.1 and when I upload images to my site, it's not generating thumbnails. It's also missing the image crop and thumbnail setting sidebar. I created a simple theme but ...
0
votes
1answer
121 views

How to have featured image show in standard RSS Widget

Is there a way of showing featured images in the standard RSS Widget in WordPress?
0
votes
1answer
771 views

MultiPostThumbnails for Custom Post Type

I have spent time and figured out how to add Multiple Thumbnails to a custom post type in the wordpress admin for the custom post type, code and question below: if ...
1
vote
2answers
2k views

Add Title Attribute to WordPress Image the_post_thumbnail

i use this code to show post's thumbnail in my site but this code cant show the title Attribute of the thumbnails. how can i add Title Attribute to WordPress thumbnails? <?php if ( ...
0
votes
0answers
88 views

Pointing Existing featured images to s3 bucket

Our wordpress site is moved to another server and we moved all the images to amazon s3. Updated the post_content and guid to s3 path. On verifying found that the images which are set as featured ...
0
votes
1answer
168 views

Better way to show Description and image Captions

I am using this code to display "Featured Image" Captions/Descriptions, also i will show my div with Captions/Descriptions only if they exist. Because my PHP skills are not best My question is : Is ...
1
vote
2answers
122 views

Reactor Theme: Prevent Post Thumb on Post

Reactor Theme is built on Zurb Foundation and is here - I think it's quite good. The theme I am replacing used the featured image in the posts or blog page but not in the post itself. Reactor calls ...
0
votes
1answer
162 views

Determine if get_the_image has image on Get the image Plugin

is there a way / function to determine if Get the image plugin successfully grab the image from post? Something like has_post_thumbnail on WordPress featured image. I need to know if featured image ...
7
votes
2answers
6k views

How do I regenerate thumbnails?

I just got a new theme and am trying to regenerate thumbnails. I'm having trouble though. I tried using the AJAX Thumbnail Rebuilder but for 5 hours it just said reading attachments. Then I tried the ...
0
votes
1answer
199 views

Show posts image attachments

I'm creating an archive page for my photoblog. My posts have 1 or more images. I'd like to show all the attachment thumbnails in a page. Using the featured image (the_post_thumbnail) only shows 1 ...
0
votes
1answer
36 views

How to enable admins/editors to set a featured image for specific category?

Well , I know how to set up a featured image for a post . But I want to set up a featured image for categories . So admins/editors can choose a featured image ,like they do for posts . And one ...