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)

0
votes
0answers
11 views

How to set featured image size in percentage [on hold]

So I'm using this code as a part of a query to get related posts <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), '' ); ?> <div class="relatedpost" ...
0
votes
1answer
22 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
21 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
2answers
26 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 ...
0
votes
0answers
36 views

Create custom image size only if the parent post is in specific category

Situation : I already have a couple of custom thumb sizes added with add_image_size() working fine. Now I need to add another custom-image-size facebook-thumb that needs to appear on my rss feeds for ...
1
vote
1answer
21 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
votes
0answers
6 views

Custom names for generated thumbnails

could someone updates this answer to the latest WP version? I don't find the code in any wp core file and haven't enough knowledge to update it by myself.. :/ Old question: Set custom name for ...
0
votes
0answers
15 views

Using advanced custom field in wp post thumbnails

been trying to get an answer to my question all over the web but couldn't find a hint unfortunately. hope someone can help me here: here is my situation: I am using the great "Advanced Custom Fields" ...
1
vote
1answer
141 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
30 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
31 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
42 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 ...
1
vote
0answers
19 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
17 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
17 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
51 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
49 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
47 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
66 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
22 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
32 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
37 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
28 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
20 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
12 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
13 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
34 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
21 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
15 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 ...
0
votes
1answer
62 views

Is it possible to get local image URL when also having photon active?

So I am using Photon, and it has helped increased my loading speed. While this is great, I am now facing a CORS error, since I am using blur.js to blur the background image of my single posts. The ...
0
votes
1answer
22 views

Is wordpress compressing my images? if so, how to prevent it?

I am using 'featured image' fields in my post and the images are sized and compressed already but whenever I upload an image that has some text, I keep noticing the image reduced in quality ...
2
votes
2answers
218 views

Differentiate Featured Image from Post Images upon Upload

I want to differentiate the featured image from post images. The plan is to give the Featured Image multiple sizes, but the images inside / connected to the post only needs the default sizes. I ...
0
votes
0answers
16 views

Featured Images stopped working with Sliding Door theme

And that's the whole point of the Sliding Door theme. It still seems to still be working for me in my main browser that I use, but when I open a different browser or have people check from other ...
0
votes
0answers
57 views

Fetching full size featured image to insert in RSS Feed

I am trying to fetch a full size Featured Image (or first image) of the post to appear within my RSS feed. See here I am using the following code function firstImg( $post ) { $matches = array(); ...
0
votes
0answers
15 views

Remove link to post thumbnail in next_image_link() in single-attachment.php

I've added navigation to single-attachment.php: <div class="navigate"> <div class="previous"><?php previous_image_link( false, '&nbsp;'); ?></div> <div ...
0
votes
2answers
47 views

Underscores.me retrieve next / previous post thumbnail in post_nav function

I am using Underscores.me for a project. I'd like to add the featured image (thumbnail) to the previous / next post links. They have a function which I'm trying to edit called THEMENAME_post_nav(). I ...
0
votes
2answers
44 views

Post thumbnail outside of loop

I'm trying to show a post thumbnail outside of the loop. The reason for this is that i want the featured image to show inside a custom page template, which will set the header image for the particular ...
0
votes
0answers
76 views

Wordpress wp_update_attachment_metadata image width and height = 1?

Hello Friends I used to set post thumbnail programetically. this is my code. foreach ($csv as $key => $value) { $filename = "wp-content/uploads/images/".$value[8].".jpg"; $wp_filetype = ...
0
votes
2answers
216 views

How do I change/modify the_post_thumbnail(); html output?

I'm working on building out a custom theme and have been struggling with this one for a bit. I am trying to modify the HTML output of the_post_thumbnail(); function. I need to do this because I am ...
0
votes
1answer
17 views

How do I get resized thumbnails?

I'm getting post thumbnails by calling the_post_thumbnail(array(400,300), true); However, this displays the fullsize featured image, just resized with the html "height" and "width" tags. This is not ...
0
votes
0answers
41 views

How to add featured image to a post?

I have a registration form where the user can upload an image. Upon registration I create a post and I would like the uploaded image to featured image. I have tried that but it is no working : ...
0
votes
0answers
101 views

Set thumbnail from URL, by grabbing image in functions.php

So I've written a whole bunch of functions, which are used to display Vine videos. I then have a shortcode which outputs the code. The last thing I have to do is set the post thumbnail. I want to be ...
0
votes
2answers
153 views

WooCommerce changes Page's Featured Image [on hold]

not sure if anyone else has ever had this problem. I have added WooCommerce shortcode to a page that has a Featured Image. [product_category category="electrical-products" per_page="9" columns="3" ...
0
votes
1answer
59 views

WP Query - Post Thumbnail

I am using the plugin: Series and by default it only gets the linked posts titles. I would like to add the post thumbnails as well. I was able to get the thumbnails to appear, but they show up outside ...
0
votes
1answer
28 views

Overwriting a Shortcode

I have a theme that extends the Visual Composer plugin with a slider on the front page. The slider will show five testimonials from five different customers. I want to add the featured image of each ...
-1
votes
1answer
31 views

Display Video as Post Thumbnail

I use the Nova free theme, from the Theme in Progress studio. I would like to display a video like a thumbnail image, as shown in this theme http://themeinprogress.com/demo/sueva/ How can I do this? ...
0
votes
1answer
53 views

Getting featured image with direct $wpdb within plugin

I'm using a customized version of the Last Viewed Posts plugin to grab recently viewed releases on my record label site. The code I'm using grabs an attachment image but it is not always the page ...
0
votes
0answers
43 views

need a wordpress loop to put in the sidebar

I need WordPress loop to do the following : check if there is no sidebar widgets active then get 5 recent posts with only titles and thumbnails But here is the thing : I don't want the loop to get ...
0
votes
1answer
53 views

Combining Post Thumbnails With Nivo Slider

I am wanting to use the post thumbnail with the nivo slider and for it to generate the image from a custom image size (already declared in my functions file) I wrote this (for generating the images) ...
0
votes
1answer
30 views

featured post as div background

Ok I didn't find an answer yet.. because my code is different.. I want to set the featured image as the div's background but I don't know how to do that.. html, php and css collide in one line.. This ...