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
votes
1answer
14 views

add page featured image to woocommerce shop page [on hold]

I am trying to figure out how to get my featured image for the shop page to show up above the shop archive. I got the archive-product.php copied over with a little tweak, not major, but I can't ...
0
votes
0answers
4 views

Set featured image using wp_insert_post

// Auto post ( Unique File Date ). $postData = array( 'post_category' => array( $Category ), 'post_status' => $Post_Status, ...
0
votes
1answer
18 views

How to replace URL protocol using PHP?

I'm using HTTPS everywhere in my website but I have problems with sharing buttons for Pinterest and Tumblr. For example, when I try to share image on Pinterest I get this error: "Sorry we could not ...
0
votes
1answer
26 views

If no featured image is set, default.png from core is shown

I'm encountering a weird issue when getting featured image urls with wp_get_attachment_image_src. If no featured image has been set, this should return null. However, in this case its returning ...
0
votes
0answers
8 views

Recent posts show thumbnail

I'm learning wordpress theme development and using Underscores as my starter theme. How can I show either a small thumbnail of a image or featured image, from each post In my recent posts custom ...
3
votes
3answers
95 views

Can WordPress crop only the post thumbnails?

I'm using the post thumbnails feature of WordPress and I have several sizes defined in functions.php. Everything's fine, it works great with Crop Thumbnail to crop them perfectly. I have a question ...
0
votes
1answer
37 views

Featured image not showing on page

I am new to creating a theme and wonder if anyone can help? I am trying to display all the featured images from posts under a specific category (id=5) on my index page and it's not working using the ...
0
votes
0answers
28 views

Previous and next posts with images on attachment page (image.php)?

Show two previous, current and two next posts with post featured images and links to previous and next post on attachment (image.php) page? I have image gallery site and that kind of navigation is ...
0
votes
0answers
15 views

Can't generate thumbnail images

Having a very strange problem with this site I recently took over hosted on RackSpace. Seems whenever i upload a new image, it doesn't generate different sizes and I'm trying to get it where it will ...
0
votes
0answers
31 views

Set Featured Image from URL using Javascript (or jQuery)

Like the title says, I'm needing to set the featured image of a custom post using javascript (or jQuery) using an image hosted externally. Basically, I have a script that searches a separate database ...
0
votes
2answers
25 views

Setting featured image based on related post

I am using a plugin called The Events Calendar. I don't always set the featured image for each individual event. Each event has an organizer ID (tribe_get_organizer_id). I want to add a filter that ...
0
votes
2answers
38 views

has_post_thumbnail() Returns False on Scheduled Posts

I am making some changes to a custom WP template and have hit an odd issue. Published posts work absolutely fine, but when you view a scheduled post the Featured Image disappears. It's as if there ...
1
vote
1answer
73 views

Retrieve featured image (thumbnail) url from multiple posts with one query

I have a list of post ids and need to get all the standard data plus the thumbnail of the posts. As there will be several hundred posts i need an efficient way to retrieve the data, just looping over ...
0
votes
1answer
39 views

How to set YouTube video as featured image?

I am trying to have all my posts with post_format set as video, have said video as the featured image. Here is what I am working with thus far but I need some help: if($post_format == 'video') { ...
1
vote
5answers
178 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
2answers
77 views

Is it possible to nest get_previous_post()?

I am trying to retrieve the previous and the 2nd previous posts' featured image as well as the two next posts' featured image. <div id="cooler-nav" class="navigation row"> <?php $prevPost = ...
0
votes
2answers
22 views

Call featured image url

How do I get the URL of my featured image? I am using buffy and I can Call The URL of The post and so on, but can't figure out how to Call The URL of The featured image.
0
votes
0answers
68 views

Show prev and next post links for parent post of current image in attachment page?

I use this code to show previous and next posts (in same category) on post pages (single.php). <?php $next_post = get_next_post(TRUE); // TRUE = in same category if (!empty( $next_post )): ?> ...
0
votes
1answer
23 views

Check if parent post is sticky on attachment page?

I use this code on post template (single.php) to check if current post is sticky: <?php if ( is_sticky() ) echo 'Post is sticky.'; ?> But it is not working on attachment page template ...
0
votes
1answer
40 views

How to scale up image into thumbnail without distorting it?

I have a section in my single post page that contains the post thumbnail. When using a smaller image as featured image (smaller than the thumbnail size, in width or height) it gets distorted to fill ...
0
votes
1answer
58 views

WP_Query condition affects posts_per_page count

I'm trying to create a new WP_Query that displays the last 5 posts from cat 1 that doesn't have a thumbnail. This actually works: <?php $the_query = new WP_Query( 'cat=1&posts_per_page=5' ); ...
0
votes
0answers
15 views

alternating placement of the_post_thumbnail

I have this situation where I need to alternate the placement of the_post_thumbnail(). I am looking for a better way of doing this that doesn't require so much code. The only way I could find to do it ...
0
votes
1answer
27 views

How to output thumbnail twice in a loop

ok I have a portfolio page. & I have two question: number 1: Every portfolio item has thumbnail attached. what I want is to print out the first thumbnail from the first post twice. One at the ...
0
votes
2answers
32 views

featured image metabox not showing on the default post types edit page

I can't get the Featured Image metabox to show up on the edit page for the default post and page post types. Though as opposed to this question, it does work for the custom post type I've created ...
0
votes
3answers
46 views

get_thumbnail_id returns full size image

I want a thumbnail of the featured image of the posts as a URL. So I'm using the following code to get a smaller size of the featured image. $post[$i]['thumbnail'] = ...
0
votes
0answers
15 views

Create Featured images on the fly

The title is too short to descirbe what i want to accomplish so let me start. I have a custom type ('chesspuzzles') and I want to create the featured images on the fly (and use them in widgets too, ...
0
votes
1answer
55 views

Page featured image not showing on home page

I'm creating my own theme, my little practice. I added the_post_thumbnail in index.php page. All latest post's featured images are showing on home page except Page featured image. While I added ...
0
votes
2answers
30 views

Remove link from post images

When Upload images from Editor and publish the post, I see for all images have link. How can remove it
0
votes
1answer
13 views

How can I assign bloginfo path or thumbnail path to a variable and call it in markup?

In my head this sound right. I check if the post has a thumbnail. If it has, I assign the post thumbnail to a variable that I call as the source for my background image. If the post does not have a ...
0
votes
1answer
91 views

Thumbnail With Next/Prev Links Not Showing Next Post?

I am using the below code to display thumbnail with next/prev posts links on single.php page. It is working fine when next and prev post are from same category but not showing the next or prev post ...
0
votes
1answer
34 views

Change theme's thumbnail to cropped WP featured image

The theme I'm using, when browsing a particular category, displays the full featured image (even if it's more than 1000px high), resized to max-width:20%. However, I'd like it to display just a ...
1
vote
1answer
39 views

Set the background to a default image if there isn't a specified “featured image”

I am having a little trouble displaying a default image as a background image when a feature image is not present. This is the code I am using <?php if (has_post_thumbnail( $post->ID ) ): ...
1
vote
1answer
67 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 ...
0
votes
0answers
48 views

Lazy Load sometimes don't work

recently I implented lazy load script into my wordpress blog through query posts. Well it is working, but sometimes javascript will not just work. Actually I have these images in sidebar aka images ...
0
votes
1answer
37 views

Featured Image of the post are gone after site move to another server

I have moved my wordpress site from Amazon AWS to bluehost with same domain. Setup and Map domain to bluehost. Install wordpress Copy plugin, uploads, and themes folder to new server Dump db and ...
0
votes
1answer
117 views

custom thumbnail image size not working

I added below code in theme's function.php add_theme_support( 'post-thumbnails' ); add_image_size( 'thumb-small', 200, 150, true ); and <?php the_post_thumbnail('thumb-small'); ?> ...
0
votes
0answers
40 views

Can't update/save featured image

I have a site that for some reason I can't seem to save a featured image to the post. When I set the featured image, it pulls it in fine - however when I hit "save" then the image disappears. Does ...
0
votes
1answer
60 views

Retrieve featured image as object

I want to retrieve the featured image of a post as an object (array) in order to have all image sizes available. The get_the_post_thumbnail() function doesn't do this, any ideas?
0
votes
1answer
56 views

Add Featured Image from Existing wp-content folder

I am using a Tube plugin that is creating my posts and pulling in thumbnail images that it is using on the main page to link to the posts. While it is creating and displaying thumbnails these are NOT ...
0
votes
0answers
72 views

Scale image down or resize image to fit on featured image thumbnail

I'm having a problem with the image scale. it doesn't fit meaning it crops to fit the container. how do you set it to resize it proportional with the container? if someone can help, please do. still ...
0
votes
1answer
58 views

Autoblog posts in wpms(network) into main site including featured images

I've a scenario like this: Blog writers, write their content into their blog and whichever post that they'd like to be seen in the main site should include the category 'Featured' (they're ...
0
votes
1answer
23 views

Comparison Operators not working for conditional author post thumbnails

I'm trying to place the default featured image on the blog index page with an image to be determined by who the author of the post is. For some reason I'm getting the image for $author_id=2 even when ...
0
votes
1answer
98 views

Featured Images missing on migrated site

I have just moved my blog from one host to another. I did this using the standard import/export method and got the new installation to copy across all the attached images. The only difference is that ...
0
votes
1answer
54 views

How to get post thumbnail to be equal to set media size

I'm new to learning WP theme development so I may not have worded the title perfectly but that's the best way I could think to explain it. My theme is on a localhost so I can't link to it but here is ...
0
votes
0answers
44 views

Scale then crop image during Post Thumbnail upload

I'm currently building a theme that has a full width slider displaying each post's thumbnail. In order for each picture to be at the same size, I'd like WordPress to automatically scale up/down to a ...
0
votes
1answer
31 views

Apply height and width for the_content() inside youtube video tag

I am displaying video and content form this function the_content() for this am using you-tube [embed] link. How can i give height and width ??? Also, I am using the_post_thumbnail() for image it to ...
1
vote
1answer
59 views

Thumbnails produce unwanted gray pixels on white background [closed]

Is there a workaround for producing QUALITY "Featured Image" thumbnails of different sizes? WordPress produces compressed thumbnails that contain grey pixels where it should be a completely white ...
0
votes
1answer
71 views

Issue on Getting Custom post type Thumbnail's URL

I need to get the URL for Custom post type Thumbnail and assign it to the_post_thumbnail('', array('class' => 'group1 img-responsive', 'href' ...
0
votes
1answer
59 views

How To Pick Custom Size Of Uploaded Image In Theme Via the_post_thumbnail();?

I am designing a magazine style theme and I want different image sizes as to show on index.php page. Now for this, I am using <?php the_post_thumbnail( array(100, 100) );?> but it is picking ...
0
votes
1answer
63 views

Add theme support for post thumbnails

I created a custom post type called products without support for thumbnails because I want to add the support for post-thumbnails in functions.php file. So I use after_setup_theme action hook and use ...