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
1answer
180 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
132 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
137 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
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. ...
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 ...
2
votes
1answer
1k 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 ...
1
vote
2answers
9k 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
3answers
9k 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
4k 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
2k 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 = ...
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' ) ); ...
1
vote
5answers
1k views

Display height and width properties with the_post_thumbnail() or related function

Problem I want the height and width properties in the img element of the Featured Image for a post, page, or custom post type. Environment I have a custom theme based on the BlankSlate theme. The ...
1
vote
1answer
2k views

How to scale image with equal width and height without distortion?

I have a section on my frontpage that querys through recent posts and grabs the title and thumbnail of each. In my functions.php, I've specified a width and height for the thumbnail using: ...
1
vote
2answers
1k views

Photo gallery with Featured Images

First, I need to ask if it's possible to create a photo gallery only with the featured images of the latest 6 posts? I assume it is possible but just want to make sure. I don't have much experience ...
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 ...
1
vote
2answers
10k views

Get Featured Image via direct sql query

I know you can use the wordpress methods for getting a featured image, however with this particular project I need to get the featured image via mysql query. Can anyone point me in the right ...
1
vote
1answer
11k views

Displaying a featured image (only img url) as the img src?

I have the following code: if (themedy_get_option('product_gallery')) { add_action('genesis_post_content', 'themedy_product_images', 1); } function themedy_product_images() { ?> <?php ...
1
vote
3answers
629 views

Bind to WPSetAsThumbnail

is there a way to bind some extra script to the WPSetAsThumbnail function? the function automatically inserts the image into the post's metabox, but what if i wanted to do something else with it? ...
1
vote
2answers
2k views

Display Taxonomy Image on single.php

I'm using Taxonomy Images, and I can't figure out how to display a category's associated image on a single.php. Essentailly, when a user is viewing a post that utilizes the single.php template, it ...
1
vote
1answer
56 views

Images not working using Featured post

I have recently moved a wordpress website abc.com to xyz.com, And xyz.com functionality is good and working well. And i have created a post with a image in it using Featured Image, and when i publish ...
1
vote
2answers
1k views

How do i show wordpress attachments from current post?

So with my blog i have a photo attachment page but it only shows to photo's at a time, and those two photo's are used as the navigation and i hate that. I want the attachment page to show all the ...
1
vote
1answer
2k views

How to add post featured image url to inline background url()?

I'd like to get a post's featured image and use it in the style="background: url()" of the post. I thought this would do it, but alas I was wrong because this outputs the whole (img src=""> stuff. ...
1
vote
1answer
466 views

Grab YouTube Thumbnail AFTER Post?

I'm using a feed to receive special YouTube feeds organized via playlists. Unfortunately, the URL is not included in the description field, but I can get the videos to display by including the source ...
1
vote
3answers
4k views

Featured image always rendered with 198px of height?

I added the following to my functions.php file: set_post_thumbnail_size( 500, 500); I enabled featured image (support => 'thumbnail') in a custom post type a created (called Page Content). When ...
1
vote
1answer
1k views

Post Thumbnails multiple sizes

I am working on a theme that shows 200/200px post thumbnail on the home page and 500/300px image on the category page. Here is what I have in fuctions.php but it doesn't seem to work (only the ...
1
vote
1answer
490 views

A good way to add a different background image for each page?

I'm working an a Thematic child theme wherein I need to have a unique image decorating each of the site's main pages, from a pre-defined set of permanent images. It would also be ideal to have one of ...
1
vote
1answer
106 views

ReOrder Post Within Categories plugin with featured image

I need to add featured image somewhere near title so I can easier sort them, currently the plugin use this code to show the title only, tried with the_post_thumbnail and nothing is showing up. Thank ...
1
vote
1answer
104 views

Confused with the loop and repeating things

In my HTML mock up, the idea is to have a thumbnail side by side and I'm doing that by using this code: <div class="jumbotron"> <img src="<?php print IMAGES; ?>/th1.png" ...
1
vote
1answer
644 views

Change post thumbnail using front end post edit form

I'm trying to get the post thumbnail to change if a user selects a new file on a front end post edit screen. This is similar to the code I use to upload data and set the post thumbnail on a front end ...
1
vote
1answer
4k views

How to add multiple featured image in meta box in post editor?

I would like to add multiple featured image in meta box in post editor area apart from default available featured image. I have added the meta box but i have no idea on adding the featured image ...
1
vote
3answers
917 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
2answers
164 views

Allow author to choose his featured image size

Request from a client. He wants his authors to be able to upload their image and then set it as featured, just like normal. The difference is that when setting it as featured, he wants the author to ...
1
vote
3answers
266 views

Thumbnail with different sizes

I want make all my blog thumbs the size of 227x133. I need images width have 100% (for responsive design). Some images have width greater than the other and vice versa. I'm using this code to show ...
1
vote
1answer
2k views

Remove image classes from post thumbnail output

I wish to remove the image classes generated by default in the output whenever post_thumbnail() is called - <img width="1024" height="768" ...
1
vote
1answer
3k views

Insert an image into a post by API

By using the code below, I can create a new post and upload an image to wordpress's upload directory as a attachment through a form's submitted data. $new_post = array( 'post_title' => ...
1
vote
1answer
4k views

Use post thumbnail as div background

I'm having trouble implementing a way of using the set WordPress post thumbnail as a background for a div which will include the whole post. Basically, I need a way to call for the thumbnail URL in ...
1
vote
1answer
487 views

How to Display Image Meta underneath EVERY image in EVERY post

First off, I want to say thank you for taking the time to even read this, I really do appreciate the help this site and it's community has given me thus far. i have looked forever to be able to ...
1
vote
1answer
1k views

why when I try to insert an image attachment along with a post does wp_get_attachment_url give me a very wrong file path?

I am using a new blog on WPMS (3.0.1, updating is not an option) to aggregate posts (and their featured image) from a few blogs on the same install, and I have to do it programmatically rather than ...
1
vote
3answers
4k views

How do I set the default “feature image” size?

I know I can set up post, pages, and custom post types to use featured images in wordpress by enabling theme support: add_theme_support( 'post-thumbnails'); Or enabling theme support for a specific ...
1
vote
1answer
348 views

Change headline text for post thumbnail meta box

How can I change the headline text for the post thumbnail meta box in the edit post screen?
1
vote
1answer
4k views

Add url from Custom Field as 'Featured Image'. Code not working

I'm trying to migrate a site to WP. We have a whole bunch of pictures, and I have done some research and figured -- I think -- my best bet is a CSV import of the data, storing the relative URL of the ...
1
vote
1answer
1k views

Featured image thumbnail sometimes in content, sometimes changes header images

I am using wordpress 3.1 and when I use the featured image metabox to upload sometimes I see in my posts the image as part of the content and sometimes the header image changes as well. I cannot ...
1
vote
1answer
143 views

Wordpress thumbnail settings change

I have a very large Wordpress image bank (over 600 images, all in use...!) and a new development will mean that i would like to change some of the thumbnail settings. I have at the moment ...
1
vote
5answers
5k views

Featured Image missing in Wordpress 3.2 Admin

I've just upgraded from 3.1.2 to 3.2, and now "featured image" is no longer listed at the bottom right of a post in admin. Has this feature of WP been removed? Can it be added back, or turned back ...
1
vote
1answer
973 views

Adding featured image via PHP

Currently I'm working on a project where site is driven by user articles, how it works: Any user goes to compose post page and writes post along with few details, has upload file option for image ...
1
vote
3answers
4k views

Featured Image VS Post_thumbnail — has_post_thumbnail lies?

OK, I got a custom post type with thumbnail enabled which adds the "featured images" panel to that post-type just fine, but in my template when I do if ( has_post_thumbnail() ) { ...
1
vote
1answer
1k views

How to add multiple featured images to post/page without a plugin

For example, in portfolio section I want to have 3 images that are positioned always in the same place in all the posts. I know there is a plugin that does this but I need to accomplish this without a ...
1
vote
2answers
773 views

How do you get thumbnails to show up in the admin edit post?

I tried to add thumbnail support to my theme add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size(133, 133, true); add_theme_support( 'post-thumbnails', array( 'post' ) ); ...
1
vote
1answer
381 views

How can I show the post thumbnail from the most recent of a certain post type, in widget?

I'm using the excellent PHP Code Widget plugin, and want to create a widget that displays the post thumbnail (aka featured image) for the most recent 'project' post. Here's the code I have so far, but ...
1
vote
1answer
1k views

Showing Thumbnail from Previous and Next Posts

Is there a simple way to use the post thumbnail when calling previous_post_link() and next_post_link()?