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
2answers
42 views

How can I see where in my themes and plugins certain image sizes are used?

I've had the same WordPress blog for years upon years, and years ago, I installed the Simple Image Sizes plugin to control image sizes. I think I wanted an easy way to set the size of post header ...
0
votes
1answer
35 views

Why doesn't the Media Browser use thumbnail sized images?

The folks updating our site oft complained about the media browser being very slow, so I went to have a look. And, on the first load of the page, and when doing a search within the media browser, its ...
1
vote
1answer
138 views

How can i place Feature Image under title field in wp-admin?

I am creating my custom Image slider, in register_post_type() -> i use : supports = "title,thumbnail"; i use only two thing in supports, "title,thumbnail" But post-thumbnails default position is ...
0
votes
1answer
124 views

Fallback image URL if no featured image exists via a shortcode function

What I'm trying to do is add a fallback image to this shortcode function that grabs the featured image to account for the possibility that a post has no featured image. (This function creates a ...
0
votes
0answers
72 views

How to display posts order by thumbnail existence in wordpress?

I want to display posts order by thumbnails i.e the post having thumbnails will display first and then display posts without thumbnail. I found same situation on Stackoverflow here , But that doesn't ...
0
votes
1answer
49 views

Can't put a hyperlink on Featured Post's Image

For the life of me I can't get a clean answer to my issue. The codex says to use get thumbnail but whenever I exchange the current code for the get thumbnail everything just stops working. I'm fairly ...
0
votes
1answer
645 views

Why use foreach to get attachment_id if numberposts is equal to 1?

I needed to pass an image to a Pinterest plugin in posts without a Featured Image so I wrote a little function to get the id of the first picture in a post. This code is in the loop-single.php where ...
0
votes
1answer
2k views

How to Make Thumbnail of Post Stay Animated

When I upload my post with an animated .gif, the thumbnail generates into a new image and doesn't stay animated. It will stay animated inside the post which is great. It seems to resize the .gif image ...
0
votes
1answer
140 views

Removing the first image in content

I've been using this code: function remove_first_image ($content) { if (!is_page() && !is_feed() && !is_feed()) { $content = preg_replace("/<img[^>]+\>/i", "", $content, 1); }...
0
votes
0answers
9 views

Registered custom post doesn't work

My registered custom post doesn't work, but other posts work. function bxx_slider_custom_post_taxonomy() { register_taxonomy( 'bxslider_cat', //The name of the taxonomy. Name should be in ...
0
votes
0answers
160 views

different featured image size in rss feed

I'm looking to achieve a newsletter by mailchimp using the rss feed of my website - which works perfectly. However, I'm calling by mailchimp two different feed to create an offset - which works fine. ...
0
votes
2answers
906 views

How to add icon over specific thumb

I wanted to do the following, and I know its possible, but I don't know how. I'm looking at in_category, but it doesn't make to much sense. Basically what I want to do, for an example on my homepage, ...
0
votes
1answer
68 views

Featured images not showing up

I´m having a strange issue with featured images. Here´s what I did: Added theme support for featured images with add_theme_support( 'post-thumbnails' ); Attached a featured image to each post ...
3
votes
3answers
2k views

Check for featured image in WP_Query

Is there a way to filter posts by featured image when initialising a WP_Query object? Example $my_query = WP_Query(array("has_thumbnail"=>true)); or, more ideally $my_query = WP_Query(array("...
3
votes
1answer
2k 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
0answers
513 views

Customising the size of images served in Visual Composer elements

I'm using the Visual Composer plugin to build, or basically visually insert the shortcode for a number of sliders, latest blog posts and masonry grids. Most of these are set to use a posts featured ...
0
votes
1answer
42 views

Get post thumbnail to display favorites

I use this line: echo (the_user_favorites_list($user_id = um_profile_id(), $site_id = null, $include_links = true, $filters = null, $post_thumbnail_id = get_post_thumbnail_id())); to display a user'...
1
vote
1answer
2k views

How to set the jpg image compression for specific thumbnail sizes?

This question was asked on Set JPEG compression for specific custom image sizes and answered very nicely by Ahmad M I'd of course comment to that thread but I don't have 50 point reputation... The ...
0
votes
1answer
237 views

Wordpress resizes image to the same size as uploaded

I am writing a theme which uses different image sizes. Here are my targeted sizes as they are set up in under Settings > Media in WP Admin: Here is the functions.php code for the thumbnail ...
0
votes
1answer
50 views

Tweak next_post_link for it to include thumbnail

I am using a fork from underscores.io, and there is this code: next_post_link( '<div class="nav-next">%link</div>', _x( '%title <span class="meta-nav">&rarr;</span>...
0
votes
1answer
110 views

add class to background image

I'm trying to make a wordpress theme, using as framework the twitter bootstrap. On one page template I need to use the featured image as a background image, so I used this code: <?php global $post;...
0
votes
1answer
42 views

Set Featured Image Based on Custom Field

I have tens of thousands of images. I also have tens of thousands of articles. These were both imported from a custom CMS. The image filenames are the IDs they had in the old CMS e.g. 12345.jpg The ...
0
votes
1answer
35 views

Set two default featured images

I use the featured image in a few places in a theme I'm creating and I'm wondering the best way to set a default featured image. I need a thumbnail variant and then a 'full size' version, both using ...
1
vote
1answer
1k views

Wordpress Uploader Editor shows broken image

I have the latest wordpress version installed. When I upload an image in the control panel for a post, I then go to edit it (crop an image for the thumbnail the way I want or rotate or do any kind of ...
1
vote
1answer
36 views

Wordpress crops images differently on retina screens?

I am currently testing my websites on different types of screens and while my image cropping works perfectly on a non-retina screen, I am running into some cropping issues on retina screens. I have ...
0
votes
2answers
5k views

How to show featured image CAPTION only if it exist

I'm using this function in my functions.php to display image caption for faetured images: function the_post_thumbnail_caption() { global $post; $thumbnail_id = get_post_thumbnail_id($post->ID);...
0
votes
1answer
80 views

How to get the URL of a each custom image size of a featured image

I would like to get the URL's of my custom image sizes for a featured image - so I can inject them conditionally. (this in functions.php) To start off, I'm removing the default crop sizes because I ...
0
votes
0answers
23 views

some featured image doesnt appear in front end - but appear in back end - wordpress

Yesterday ive move my website to a new server running with Centos. It appears that some featured image ( not all) doesnt appear in front end . . . . weird things, if i go to edit post, the image is ...
0
votes
0answers
90 views

Show Post title and featured image outside of the box

I'm trying to work out my idea to show post featured image and post title outside of the post content. Let me explain better. I'm using underscore framework. There are three files there. single.php, ...
0
votes
0answers
108 views

How to call the post thumbnails in a list of recent post in wp nav menu?

Thanks to Stack I found a code which allow to list recents posts of each of my categories into my wp nav menu. The code looks like this : // Front end only, don't hack on the settings page if ( ...
0
votes
0answers
31 views

The images in the post arent Visible after publishing them?

I write a post in new post editor and then add media. I can see the images in the editor but when i publish them they aren't loading up and a frame with little square in the middle comes up. This is ...
0
votes
0answers
26 views

Custom post type: require adding feature image

My plugin contains a custom post type and I would like to force the user to add a featured image for publishing the post. I don't find anything in the Wordpress references regarding this.
0
votes
1answer
176 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
2answers
154 views

the_post_thumbnail('medium') setting some images width=1 height=1

I have a created a custom post type and gave it a field of image which can contain a gallery. When I'm inside content.php I can call up all available data such as title, postmeta and such just fine ...
0
votes
0answers
106 views

external url image in featured image does not show on 'view page'

This question seems to repetitive, but none of the solution worked for me. I have csv file to be uploaded for products in woocommerce and csv file is having external image link which is supposed to ...
0
votes
0answers
28 views

how can i edit this code to show extenal image as thumbnail

I wanted to place a thumbnail near my latest post showing on my homepage. After much research I come across a code that can show any post's first image as thumbnail, that's cool right? Well the code ...
0
votes
0answers
67 views

How to exclude categories as well as their respective thumbnails from custom prev-next navigation?

I added the following to my functions.php file: function wyrta_post_nav() { global $post; $exclude_cats = "8"; // Don't print empty markup if there's nowhere to navigate. $...
0
votes
0answers
224 views

Get Post thumbnail without width/height attribute

I am wondering if there is an easier/more efficient way to print a post thumbnail without the width/height attributes. I like to control my image sizes with CSS, so I can do things like: width: 30% ...
3
votes
2answers
5k views

Display Category Thumbnail and links in Woo commerce

I would like to display my categories with a thumbnail in woocommerce. I am able to list the child terms as a link but i would like to add additional content. I have added the code below in which I ...
0
votes
0answers
122 views

Show Featured image above post title

I need help with my worpress website, everytime i post a post my featured image ends up on the end of the post like this how to chanage it so that it shows above or below my post title, Thank ...
-1
votes
1answer
113 views

Fetch first image URL from post and set as featured image URL

I would like the theme to fetch the first image URL in the post area and display it as the featured image. This came from an old Affiliates WordPress theme functions.php file. This company has closed ...
0
votes
1answer
290 views

Get source from the_post_thumbnail

I'm struggling because I'm using the "Sitewide Tags"-Plugin to grab all posts in a network to the main blog. Now I want to embed the post images to the main blog and the only function you're able to ...
0
votes
1answer
29 views

The location of the html output from the_post_thumbnail();

So I added the_post_thumbnail(); so I can add images through the featured image area in the wordpress. I am trying to add schema to the output since it isn't working by just wrapping ...
0
votes
1answer
67 views

changing size image within the content

I'm trying to get my images inside the post may larger than 800px ; For this I took a function that resizes image here and I'm trying to create a function to my thumb inside the post come with size ...
0
votes
0answers
53 views

Why don't my thumbnails don't work when setting the size in get_the_post_thumbnail()?

I'm using the code below to display a list of posts on my homepage with thumbnail, title, and summary text. The problem I'm having is that rather than using the thumbnail image which is a max size of ...
1
vote
1answer
718 views

Getting Featured Image Caption to Only Show if Populated

Good evening! I'm trying to hide the featured image caption from showing. Currently, it'll show build the div (but not populate it because it's empty). What I'd like to do, ideally, is only show the ...
0
votes
1answer
36 views

Wanting to change presentation from full post to featured image (post_thumbnail) only

I am working on a blog (http://goo.gl/xazMe0) and this is the code of the index.php: <div id="main-content" class="main-content row"> <div id="primary" class="content-area <?php echo $...
0
votes
1answer
19 views

Featured images are cropped on index and post page

I am using a theme called Simple Bootstrap and after a recent update, the theme began cropping the height of the featured images on both the index and the post page. When I inspect the specific ...
2
votes
2answers
95 views

Query sticky posts with thumbnails

I need to display max 5 latest sticky posts that have a thumbnail. And I need to have accurate counting of the displayed posts. I've tried to exclude sticky posts without a thumbnail with meta_query, ...
0
votes
2answers
823 views

Show LightBox when clicking on featured image [closed]

My WordPress site displays featured images at the top of each post. Here's the PHP code from post.php that generates the featured image. <?php if ( current_theme_supports( 'get-the-image' ) ) ...