Questions tagged [post-thumbnails]

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.

Filter by
Sorted by
Tagged with
3
votes
4answers
16k 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
1answer
69 views

Special purpose photos with each post

How would I grab a photo, that has been added to a post, and use it elsewhere on a site when there have been several photos added to the post? For example, my site has a blog (Wordpress) and a non-...
0
votes
3answers
483 views

Thumbnail and image management

I always though the the image manager into wp is not really good... I need to be able to generate square or custom size when i like where i like, much like TimThumb that generate thum on the fly... ...
0
votes
2answers
371 views

Facebook is only displaying preview thumbnails that are 100px from my posts?

I'm using Facebook and Digg Thumbnail generator and [FaceBook Share (New)], 2 As you can see if the image is 100px the thumbail is displayed when I press the share button: But with an image with ...
14
votes
2answers
10k views

Programmatically get images by URL and save in uploads folder

I am involved in a large migration from another CMS to WordPress. We have a copy of the database and have worked out how to extract the content and programmatically create WordPress posts from it ...
0
votes
2answers
1k views

Featured Image meta box shows at the bottom?

After using this code: //Set custom featured image metabox function customposttype_image_box() { remove_meta_box('postimagediv', 'eezzyweb-webfolio', 'side'); add_meta_box('website_grid_view', __('...
0
votes
1answer
3k views

Featured image/thumbnail fallback placeholder image

I'm currently using the_post_thumbnail(); to display featured images in my pages. Is it possible to set a fallback placeholder image in the event a featured image hasn't been set?
0
votes
2answers
312 views

Using the on-board image editor for featured images: edits are not being used

I've never really been comfortable with the on-board image editor in WordPress, and here's a good example of why: I'm just setting up a vanilla WP installation and am using the TwentyTen theme. I've ...
0
votes
2answers
544 views

If the_post_thumbnail(); is this - echo this text

I'm using the_post_thumbnail(); (aka featured image) to show a news source logo. If I use that image, I'd like to output the name of the news source. For example: if the_post_thumbnail is "new-york-...
3
votes
1answer
2k views

How can I add the “Use as featured image” to a custom metabox?

I am implementing a custom Meta box that allows the user to add images via a simple file input field (based around code on this site: Meta Box Script). This code allows multiple images to be added as ...
0
votes
1answer
639 views

How to add a new thumbnail size only to a certain custom post type?

I know how to add a new thumbnail size to my custom plugin. But i want to know if is possible to restrict de new size only to a certain custom post type? Thanks in advance.
9
votes
1answer
22k views

Upload post thumbnail from the front end

We would like users to be able to upload the post thumbnail when editing posts. How would this be done. I would imagine it would make use of the ajax functions of wordpress. Any ideas, Marvellous
0
votes
1answer
335 views

attach several images to post + gallery

i'm wondering if its possible to attach several images to a post then display those images in a thumbnail/fading gallery? By the way, the images should also be resized to a fixed size + thumbnail. ...
0
votes
1answer
467 views

How to bring files from the upload directory to the media gallery?

My wordpress theme creates thumbnails of media files that I upload into my posts. These thumbnails are not accessible inside the media gallery, they exist only in the media upload directory. I want ...
3
votes
3answers
4k 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
2answers
3k 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' => '', '...
4
votes
1answer
4k 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, ...
0
votes
1answer
1k views

Multiple Post Thumbnails plugin and attachment error

This question specifically deals with the Multiple Post Thumbnails plugin, though the problem may have to do with my installation of WP itself as nobody else seems to have had this problem. I am ...
4
votes
3answers
13k 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
2k views

featured image is not showing

i have a problem with my website my feature images are not shown i have uploaded it as set as featured image but after so many tries there is no way to show the feature image please help me
2
votes
2answers
2k views

Displaying Child pages of the current page in post format and their thumbnails (featured image)?

I'm using the following code I got from the Wordpress codex: <?php // Displaying Child pages of the current page in post format $mypages = get_pages('child_of='.$post->ID.'&...
2
votes
2answers
419 views

How to handle thumbnails

How should I handle post thumbnails? Do most people put them in custom fields? Use a plugin? How do themes on ThemeForest handle this? Also different theme will have different size requirements? So ...
33
votes
6answers
73k views

How do I get image url only on the_post_thumbnail

I want to know how to get image url on the_post_thumbnail() Default the_post_thumbnail() <img width="800" height="533" src="http://domain.com/wp-content/uploads/2011/02/book06.jpg" class="...
3
votes
2answers
581 views

how to test for attached image

I am trying to find out whether or not a post has images. If it does, I then want to know if a featured image was specified for the thumbnail - if not, the get_thumb() function will assign an image ...
1
vote
1answer
384 views

Why is the post title and content automatically being displayed in the post thumbnail (Featured image)?

I use the following code to show the post thumbnail (only): <?php // Create and run custom loop $custom_posts = new WP_Query(); $custom_posts->query('post_type=page_content&...
1
vote
3answers
5k 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 ...
10
votes
7answers
8k views

Display thumbnail only if requested size exists

When I use the functions that get and output the post thumbnail, they will display the requested thumbnail in the size you specify, but if this size doesn't exist they will display the thumbnail in ...
-1
votes
3answers
2k views

Looking for a related post plugin which slides-in like the one at inc.com does [closed]

Does anybody know a Wordpress "related post" plugin with behavior like the one at inc.com. For a demo, visit any article at inc.com (ex: http://www.inc.com/guides/2010/10/how-to-design-a-great-about-...
1
vote
2answers
470 views

Wordpress Featured Image function recreate

I am facing a problem of recreating a featured image function to show different images in different section. I was trying to modify the existing function "Featured Image" and duplicate the post meta ...
0
votes
1answer
978 views

On what point (hook) does the_/has_post_thumbnail() load?

I got some problems during my loading priority/order that i already discovered. Now i ran into the problem that i can't use any post_thumbnail functions (get_post_thumbnail_id, has_post_thumbnail, ...
3
votes
3answers
3k views

Black and White thumbnails

There are ways to convert color image to black and white on the client side with javascript. However, it won't work in all browsers and it's slow. Is there a way to convert Wordpress post-thumbnails ...
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 ...
2
votes
1answer
587 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
3k views

MultiPostThumbnail and the_post_thumbnail

I am using built-in Wordpress function to add (small) thumbnails to each post. In addition to the post thumbnail I am using MultiPostThumbnail plugin to add custom category (large) image. Since not ...
0
votes
1answer
378 views

How to move featured image to the top of the list?

I have been working on using featured image to create a list of items on the right column here: http://www.julianamaeberger.com/soma/news/ The current featured image is now being given a class of "...
3
votes
3answers
27k views

Remove title attribute from images

I'm looking for a way to remove the title attribute from images, preferably through using a hook or a filter. Most clients don't bother giving images a proper title, thus eliminating the purpose of ...
6
votes
5answers
5k views

change set_post_thumbnail_size according to post type admin page

I have a few custom thumbnail sizes and obviously one of them is used in the set_post_thumbnail_size, what directly affects the interface in the admin area. What I'm looking to do is to intercept ...
36
votes
4answers
26k views

Filter to remove image dimension attributes?

I'm working on a site based on a fluid width css template which sets a max-width on images to the width of the column containing them, and I need to remove the inline width and height dimension ...
3
votes
1answer
6k 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 (#bgimg)...
0
votes
1answer
264 views

Of thumbnails and folder permissions

I am trying to make TimThumb work on my domain. After having tried and tested every step on this troubleshooting guide, it finally came down to folder permissions. The thumbnail cache is owned by my ...
0
votes
1answer
691 views

How to show a featured image as current?

On the right rail here: http://www.julianamaeberger.com/soma/sample-testimonial-3/ I am showing a random post "Testimonial". Below that I am showing all featured images for the category "Testimonial" ...
1
vote
2answers
592 views

How to pull image from first post and display it on monthly Archive page?

I am using a custom template for my monthly Archive page. This page will show all the posts-links (category-wise) for the particular month. In the very first post of each month, there shall be only ...
1
vote
1answer
398 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 ...
10
votes
5answers
35k views

Can I set a default featured image for a category?

I'm setting up a site with a theme that takes advantage of the "featured image" feature of WordPress. Since my end users are not the most tech saavy in the world, I'd like to set things up so that the ...
7
votes
3answers
11k 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. ...
0
votes
2answers
350 views

Server B handling add_image_size() differently than Server A

I'm curious what dependencies add_image_size() has because I just copied a theme over to a new server and began adding thumbnails to custom post types only to find out that my request for hard-...
6
votes
4answers
9k views

Getting Thumbnail Path rather than Image Tag

I see many methods of showing thumbnails in WordPress, but I'm not immediately sure how I could get only the path to a post's thumbnail rather than the html-ready code generated by functions like ...
7
votes
1answer
2k views

is it possible to replace the use of gd_lib with imagick or ImageMagick?

i'm looking around for a solution since weeks and can't make anything work yet. the problem is that my server is running debian/lenny and it's not supporting the bundled gd_lib which i need for ...
6
votes
4answers
8k views

Auto-retrieve YouTube Image for Thumbnail?

I have a custom post type that accepts a YouTube embed HTML snippet, title, and a featured image. Currently, I'm going and finding an image for the featured image, but ideally I would be able to ...
18
votes
3answers
11k views

add_image_size() for specific Post Types

set_post_thumbnail_size( 80, 80, true ); // true for all post types Suppose I have two post types in play on my blog: Post, Video and Product. I may want a 80x80 image size for my posts, but 100x100 ...