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)

2
votes
2answers
2k views

How to change post thumbnail title and alt attributes to post title?

Can we change the title and alt attributes of the_post_thumbnails and set them to post title instead ? like creating a function for it and adding a filter ? I tried searching but I can't seem to find ...
2
votes
1answer
500 views

Add a featured image in my theme?

I'd like to add a Featured image to a default article or a Custom Type Post in my theme but I don't get the area of the highlight image, why? In the default theme the option is present but not in my ...
2
votes
1answer
7k views

Featured Image Panel Missing From Custom Post Type in Wordpress 3.2

Upgraded to 3.2 from 3.1 and lost the featured image panel in admin that was running in a custom post type. add_action( 'init', 'create_my_post_types' ); function create_my_post_types() { ...
2
votes
1answer
2k views

get_the_post_thumbnail() doesn't taking style attribute

This seems to be an easy one but its giving me quite a hard time. get_the_post_thumbnail() suppose to take attribute as an array. Well, everything working right but when i pass style attr its doesn't ...
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 ...
2
votes
2answers
188 views

Setting featured image with function, 1 part not working

I'm trying to set a post's featured image based on custom fields. There are different types of posts and therefore the featured image should be set depending on which custom fields have been filled ...
2
votes
2answers
1k views

How to scale up post thumbnails/featured image?

Is there a way to scale up post thumbnails on Wordpress? On a featured div I want a post thumbnail/featured image with 584×348 px. When I upload a smaller image as a featured image on a post, it ...
2
votes
1answer
4k views

No Thumbnails Generated

I setup WordPress on my own server and it's up and running...one thing that I have noticed is that WordPress doesn't generate any images I upload. Usually when I upload an image through WordPress it ...
2
votes
1answer
175 views

Adding a custom field or metabox to the post-thumbnail widget?

Is it possible to add a custom field to an existing "widget" in the backend? What I wanna do is provide a way to have a checkbox to apply a thumbnail that is double the size of the normal one on the ...
2
votes
3answers
3k views

How do I add the featured image to the_content after the first paragraph?

My problem: I'm trying to create a filter that will add the featured image of a post to the_content, so that I can have the first paragraph of the_content displayed before this image. What I basicly ...
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
1answer
182 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 ...
2
votes
1answer
815 views

Change Output for Images in Content

I want to wrap some html (divs and classes) around the tag (to create the appearance of photo corners by way of an image sprite). Basically, I want to re-write all tags added by WP in the content ...
2
votes
1answer
3k views

Show current page featured image in sidebar

How do I call the current post's featured image in the sidebar? and if there is none, then a backup image?
2
votes
2answers
2k views

How can I make post fields required in Wordpress?

I am setting up a Wordpress site as a CMS and trying to figure out a way to make certain post fields "required" before an author can publish a post. In particular, I want authors to be required to ...
2
votes
1answer
50 views

Require a featured image to publish post

I have a multi author WordPress blog. I'd like to allow publishing of a post only when a featured image is set. How can that be done?
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( ...
2
votes
2answers
209 views

User facing form to upload image on wordpress

I have a client who bought a wordpress theme that is built for posting job listings, a user can create an account and then post job listings but my client wants it converted to post Wheel listings ...
2
votes
2answers
1k views

Cropped thumbnail still displaying as full image

Steps to reproduce... 1) Add to functions.php: add_image_size( 'half-size', 200, 200, false ); 2) Add to template file (inside loop): <a href="<?php the_permalink(); ?>" title="<?php ...
2
votes
2answers
1k views

Check for featured image in WP_Query

Is there a way to filter posts by featured image when initialising a WP_Query object? Example $my_query = WP_Query(array("has_thumbnail"=>true)); or, more ideally $my_query = ...
2
votes
1answer
1k views

Delete Post From Front-End and attachment permanently

Is there a way to delete a Post From Front-End and it's attachments permanently? This is a snippet that moves the post to the trash can, but it doesn't remove attached images (they remain on the ...
2
votes
1answer
2k views

How to create thumbnails with a fixed width, so all of them will have the same width?

right now, a thumbnail will be either 150px in height or in width, depending if it's landscape or portrait. Is there a way to make them always the same width and scale them in height accordingly, ...
2
votes
1answer
3k views

adding an id to the_post_thumbnail

I'm attempting to use the 'feature image' feature of Wordpress to make a full screen background, that resizes to fit the browser window using jQuery The bit I'm stuck on is adding a custom id ...
2
votes
2answers
64 views

How to Set Featured image In Wordpress without Showing it into Post?

I just want to set featured image of my post but don't want to show it in my post. How can I do that? Detailed : I want to post to show its thumbnail in main page but not to show it when we expend ...
2
votes
1answer
435 views

Function to auto-set a featured image that is already in use

I don't even know where to start with figuring this out.... This function for functions.php grabs the first attached image in a post and sets it as the featured image. The problem is that it will not ...
2
votes
1answer
222 views

previous / next post with thumbnail

I've got another question regarding next / previous post. At the moment I'm working on our portfolio with several items. Each item is a post with a title, category & featured image. When viewing ...
2
votes
1answer
398 views

How to List Thumbnails based on Custom Categories

I need to list(display) all thumbnails from my Custom Post Types in a page template based on product categories. For Example I have a Custom Category called "Art" and some images(Custom Post Type) ...
2
votes
1answer
1k views

Thumbnail and Featured Image With Fixed Sizes?

In my index.php file, I'm trying to create a thumbnail for each post with the size width: 200px and height 142px. And on the single.php, I would ike for the featured image to be width: 598px and ...
2
votes
1answer
161 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'=> ...
2
votes
3answers
3k 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
2
votes
1answer
956 views

Image uploader with “Set Featured Image” link on front end

I am loading upload-media.php file using thickbox on front end where user can upload images to the post. Question: How to I trigger the upload-media.php so the link "set featured image" shows up on ...
2
votes
1answer
377 views

Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory

I have a bunch of old posts on a blog that I would like to assign a featured image to. I have retrieved all the images I would like to use for each post. I saved each image file name after the slug ...
2
votes
1answer
1k views

List category posts - Thumbnails are not displaying

we've been using List Category Posts to display different category posts on one page and it was working great until recently when the thumbnail images disappear. The 'thumbnail=yes' option is there. ...
2
votes
1answer
511 views

Archive Thumbnail Gallery

I am trying to create a Archive page with a list of all my posts with thumbnail and a small excerpt underneath. kind of like what this guys is doing ...
2
votes
2answers
1k views

add_image_size for post type

I currently have this in my functions file, which works as expected: // Enable Post Thumbnails add_theme_support('post-thumbnails'); // Custom Thumbnail Sizes add_image_size( 'square-small-thumb', ...
2
votes
2answers
2k views

WP Insert Post function - Insert Post Thumbnail

Whilst performing wp_insert_post, how would one insert the post thumbnail. I tried the code below to no avail. $postit = array( 'post_title' => $itemtitle, 'post_content' => '', ...
2
votes
1answer
868 views

Display All Post Attachments and Assign Class to the Last Image?

I have a function get_images() in which I would like to display all image attachments for the current post (or page) in a list with the last image having a class="last" attribute to mark it as the ...
2
votes
0answers
563 views

How to get featured post title & image using JSON API?

Is there any possibility to get featured post title and image using the JSON API. I tried using this: example.com/?json=the_post_thumbnails&count=3 But instead of recent posts, I get featured ...
2
votes
1answer
73 views

How to compress thumbnail images of two different sizes?

I'm new to wordpress and so far with a limited knowledge of PHP, I was able to build up a theme from scratch. I removed the compression for my homepage images for a better quality of pics. Now, the ...
2
votes
1answer
907 views

Allow user to manually set crop area of default/custom image sizes on upload [on hold]

I'm looking for a plugin that allows the user to define where the image will be cropped for a given thumbnail size. For example, the user uploads an image, a screen comes up with the image and a ...
2
votes
1answer
132 views

How to remove thumbnail sizes for specific post type on a child theme?

The theme I'm using includes a slideshow that generates an additional 4 image sizes for every image that is uploaded. I don't need to have all those images being generated for every image. Is there ...
2
votes
1answer
126 views

Hide upload image fields for the different media upload popups

I am trying to change a few of the options in the Set Featured Image popup in the Wordpress admin. I can't seem to find anything that determines if the popup window is a Featured Image or an Add Media ...
2
votes
1answer
125 views

How to change the naming of the resized image files

Now with custom image sizes Wordpress is almost as powerful as timThumb / phpThumb. There is one problem however. The way Wordpress handles the resized images are chaotic and doesn't survive theme ...
2
votes
1answer
138 views

Featured Image Size Conditional Tag?

Is it possible to check what image size has been selected for the featured image and only display that image.. For example. <?php if(has_post_thumbnail('small-image')): ?> ...
2
votes
2answers
117 views

Multiple instances of Featured Image Query

I have some custom code built into the header of my theme that gets the featured image from a post, displays the image and links to the posts permalink when clicked on by a user. The problem I am ...
2
votes
1answer
109 views

Converting Attachment to Images?

I've had no problem using lightboxes before with attachment images, but I've switched to a new theme called Quicknote and it seems that attachment images now instead link to the attachment page. ...
2
votes
3answers
2k views

How to grab first image attached to post and display in RSS feed?

I've seen the tutorials on how to grab the first image and display it in a post, and those on grabbing the post_thumbnail and using that in the RSS feed, but does anybody know how to grab the first ...
1
vote
3answers
7k views

Display thumbnail only on the very first post in the loop?

What's the best way to use <?php the_post_thumbnail();?> in my loop BUT only show a thumbnail on the FIRST post? Meaning, only the first post in the loop will have it's image shown? Here is an ...
1
vote
2answers
3k views

Remove the Featured Image Meta Box

How can I remove the Featured Image meta box? I've tried using the remove_meta_box function and specifying the boxes ID but it doesn't seem to work like it does for the other native meta boxes. ...
1
vote
3answers
1k views

How to add/assign or change featured image in post programmatically?

I have written a plugin that (besides other functionality) makes posts from existing content. For each post I have one picture - how to make them featured programmatically? I do the: $id = ...