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)

1
vote
0answers
20 views

How to get rid of the strange sizing of links around posts? [closed]

I am currently running into a bit of a problem on my Wordpress site. I am designing a theme using the Bones framework, and after working for a while I have discovered a weird bug with links. Any time ...
0
votes
1answer
63 views

Retrieve a post's featured image with PHP outside of WordPress

I have a little Windows application that I would like to be able to use featured images from posts on my site with. My site lists and reviews modifications for a computer game and the application ...
0
votes
0answers
157 views

Display featured image on blog page

The commented out portion is what I've added to pull the featured image set on the blog page. Without that chunk I'm able to set the image, or pull from the home page's featured image if that ...
0
votes
1answer
205 views

Display featured image file size, extension, filename, type, orientation?

How to display some information of featured image in post. I need to display: 1. a. Image file size (in kb or MB) b. Image type (.jpg,.gif...), c. Bare image name, with and/or without image ...
0
votes
3answers
147 views

get_the_post_thumbnail() - Invalid argument supplied for foreach() in /wp-includes/post-thumbnail-template.php on line 64

The past couple of hours I am trying to find out what is the problem with this... <?php $related_posts = get_field('related_posts'); ?> <?php if ($related_posts) : ?> <div ...
0
votes
3answers
45 views

Deleted pages showing up when querying for child pages

I'm using the following code to display the featured image, post_title and custom field data from relevant child pages. <? $child_pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE ...
0
votes
0answers
28 views

how to get wordpress categories list with thumbnails?

i am trying to get thumbnails list with their thumbnails images .i tried code below but it only gives categories list . i know there a could do using feed_image but i can't figure out how to do it ...
0
votes
1answer
79 views

add_image_size() and uploading the exact size leaves 1x1 image in uploads

I've added an image size of 370x150 which works, but if I upload an image to those exact dimensions get_post_thumbnail() no longer works as expected. If I look into my uploads folder I'll have a ...
0
votes
1answer
85 views

How do I add a featured image to a single post page?

I'm using the Pinboard theme on WordPress 3.9.1. I'd like to edit Pinboard (or, more accurately, make a child theme) so that on single post pages, if the post has a defined featured image, it displays ...
0
votes
1answer
41 views

Delete post media except featured image

I'm working on site where post except 'featured image' has also other images. Under certain circumstances I need to delete all images except 'featured image'. Which one the most convenient way to do ...
0
votes
1answer
39 views

Where to add the_post_thumbnail( )

I am trying to add the featured image of a post into my category archive pages. My theme already supports post-thumbnail (used for the sliding top menu of the sliding doors theme). from what I ...
3
votes
1answer
99 views

Featured Image Inherited from Parent Page

What I would like to do is have my parent page's featured images display, unless a child page has its own featured image, then I would like that image to become the featured image from that page and ...
0
votes
1answer
69 views

Mass/Bulk assign featured images to posts

I have a text file with post ids and attachment ids like so: post_id,attachment_id post_id,attachment_id post_id,attachment_id post_id,attachment_id I then try to use a function inside my ...
0
votes
1answer
48 views

Conditional to grab parent page thumbnail URL

I'm currently using this code to grab the featured image URL and insert it as a background image: <?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );?> ...
0
votes
3answers
103 views

Problem with showing featured image

I am using the code below for showing featured image in single post content.It's working fine.But when I call the_excerpt(); in any template it showing featured image with post content.I want it show ...
0
votes
1answer
76 views

Featured Image URL is Showing but not thumbnail

I added posts from other CMS to my new word press site. For featured images I changed, wp_post table as post ID: 2300 Attachment in "wp_post": ID:3400 post_type: attachment post_mime_type: ...
2
votes
0answers
440 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 ...
0
votes
1answer
39 views

Related post thumbnail not showing up

I have created a 'related posts' custom field and would like to loop through all the posts that are added as a relation and show a bit of info from each (the title, a link and the featured image). ...
0
votes
0answers
56 views

get the post thumbnail returns the full size

The function get_the_post_thumbnail($post->ID, 'thumbnail'); not always returns the thumb size of the image (which is 100x100) for some posts it does but for most of them it doesn't. Even though ...
-1
votes
2answers
96 views

Change featured thumbnail based on screen size

My theme has the option( like any other theme I guess) to chose a predefined featured image size( thumbnail, medium ...etc). I chose the image to be thumbnail, made it 150x150 in media settings but my ...
0
votes
1answer
94 views

Get last post in category thumbnail

I want make a button to filter posts from a specific category, But also i would like this button to display the featured image of the latest post in that category. I'm completly new to php and ...
0
votes
1answer
17 views

Adding in support thumbnail removes editor

I have created a custom post type. And on the custom post type I would like to have a featured image. I have added the featured image to my custom posts however when I do this it removes the main text ...
0
votes
0answers
106 views

Get thumbnail using wpdb from external wordpress database

I'm trying to get thumbnails from posts using a wpdb query where the wordpress database I'm querying is not the one from which the wpdb query is being called. That may be a little unclear, so here is ...
0
votes
2answers
64 views

Page thumbnail doesn't display on navigation

I want to display thumbnail on navigation (using walker) but it doesn't display in the right place. Thumbnails displays only in index.php, before the navigation links and all these thumbnails are ...
0
votes
1answer
41 views

Featured image with link to post shortcode, image displaying above the post

I have created a shortcode to display the featured image linking to the post: function ck13_post_image($atts){ extract(shortcode_atts(array( 'ck_img_size' => 'full' ), $atts)); ...
0
votes
1answer
143 views

How to get cropped thumbnail source for custom post type

I need thumbnail image url with size 148*148px. I using custom post type for testimonials. I need just the image source like http://example.com/demoimage.jpg. It is possible to get cropped image ...
0
votes
3answers
197 views

the_post_thumbnail scaling not hard cropping

Lately I wanted to upgrade my blog with featured images/post thumbnails. I'm using a custom theme build on the roots theme (this is not a roots theme issue, I believe). The image I upload is 1024x768 ...
0
votes
1answer
82 views

WordPress not creating “large” thumbnails

I moved my WordPress installation from my local dev environment (MAMP) to a shared hosting server. Since then I have trouble with image uploads not being processes as before, especially with the large ...
1
vote
1answer
138 views

Get ID of featured image using “get_post_thumbnail_id(the_ID())” - without printing to screen?

I'm using the code: get_post_thumbnail_id(the_ID()) to get the ID of a post thumbnail image, but whenever I call this it outputs the ID to screen. I just want to get the value to use in another ...
1
vote
1answer
310 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
2k views

wp_get_attachment_image_src() and custom sizes

As said in this page, wp_get_attachment_image_src()only accepts built-in sizes such as thumbnail, medium, large or full. How do you get the same return value with custom sizes you add with ...
1
vote
1answer
89 views

Can't seem to attach uploaded image to post and set it as thumbnail

I'm using this code to submit a post form and upload an image which I want as the post thumbnail. Everything submits perfectly and the image even uploads but I can't seem to figure out how to attach ...
0
votes
2answers
719 views

Using global $post; to get featured image for custom post via WP_Query

I'm using a site-wide function to add css to the <head> of the page pull in featured images of various as a responsive page background. It works great across the rest of my site but fails on a ...
2
votes
1answer
67 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 ...
0
votes
1answer
97 views

Featured Image not showing on wordpress hosted under Amazon AWS

I created a wordpress website on Amazon AWS. I also installed the same theme on wordpress hosted under Bluehost. The problem with wordpress hosted under amazon is that it doesn't show the featured ...
0
votes
0answers
30 views

Worse thumbnail quality after GD library install

Last week I had to install the GD library on my server to enable thumbnail resizing for a premium theme. After installing the GD library on the server the image quality of newly added thumbnails for ...
0
votes
0answers
93 views

how to change featured image path according to “alt” property

when a featured image is added, the path for this image is http://domain.com/wp-content/uploads/filename for some featured image i would like to use only "filename" in the path do you know how to ...
0
votes
0answers
84 views

Problem with Featured Image and database

I have an issue with with WordPress install which I just haven't been able to resolve... I have tried disabling all plugins and reverting back to default theme, but the problem remains. The issue is ...
0
votes
1answer
80 views

How to check if single.php has already called the_post_thumbnail function

I am creating a front end plugin to upload images and adding filter in the_content() to display post thumbnail but some templates already have the_post_thumbnail in single.php or loop.php. Is there ...
1
vote
1answer
269 views

set_post_thumbnail_size not cropping featured images, but reducing proportionally

In my function file, I set the following: if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 150, 50, true ); } And in the ...
0
votes
1answer
44 views

Admin - no Featured image choice in create new/page|post

I am developing a WP theme and I wanted to add a thumbnail/featured image to a new page/post but there is no such option/choice - like it used to be, I am using WP 3.8.1, I did try to turn off all the ...
0
votes
1answer
38 views

Thumbnail of the latest posts page

I have a page "Blog" and it's set to display latest posts. This page itself has a thumbnail, and I want it to be displayed in header. Every other page/post has same layout and thumbnail shows in ...
0
votes
1answer
797 views

Responsive scaling of image for the_post_thumbnail() [closed]

In my functions.php file, I have: add_theme_support( 'post-thumbnails' ); add_image_size( 'kev-feature', 650, 342, true ); In a template file, I have: <div ...
0
votes
0answers
90 views

Resize the image but not Crop

I have a WooCommerce cart for WordPress and am trying to get the images I upload for the thumbnails to be the aspect ratio i set it (270px × 200px) and not crop. Here is an image showing what i’m ...
0
votes
0answers
28 views

problem with blank page

i have a real big problem with my wordpress website functions.php when i put the following code to achive post view and thumbnail. i'm getting the blank page error which when i publish or update a ...
0
votes
0answers
38 views

Building a plugin: use offset values, save to database, call values on frontpage in loop

I first posted this on StackOverflow, but now I realise that this is probably more suited for this site. Updated 26 Feb. 2014 I already that this question will be quite elaborate, so for everyone ...
0
votes
0answers
16 views

Any easy way to automatically set the first inline image in a post as the thumbnail, for relative images?

I stumbled upon a problem in this post if you use a link like i.e. a relative URL, it won't work is there a neat trick around this problem? this solution should be URL independent. I.e. use a php ...
0
votes
1answer
90 views

how to both crop (with tool) and resize thumbnails having only a max width constrain?

I can't found my very problem in other threads. I'll try to explain: want to use thumbnails MAX 400px width. That means that CAN be 400px, but not always they should be 400px width. They can be even ...
1
vote
0answers
46 views

Setup Featured image on all posts from thesis thesis_post_image custom field?

I moved from thesis to other wp theme and i want to change the thesis post images (these are saved under thesis_post_image in database )as featured images. Site have over 1000+ posts. Is there a way ...
0
votes
0answers
25 views

Make first inline image an attachment, so the featured image can be set automatically with a plugin?

So it is NOT an attachment yet, it is inline e.g.: <img src="../pic/logos/rsi.gif" /> in the post. And I want automate that the first occurrence of such an image becomes an actual attachment ...