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)

2
votes
1answer
1k 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
1answer
574 views

Cannot get post thumbnails to display

I'm stumped. I've pored over all the articles here and beyond to no avail. I'm trying to simply display the post thumbnail in a template page, but it will not show up. I have thumbnails enabled for ...
0
votes
0answers
7 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
14 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 ...
1
vote
1answer
1k 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
918 views

Cropping thumbnails to specific dimensions on front end post

Probably not the best title description but here we go. One of my custom post types is for youtube videos which I take the thumb from youtube and upload it as a thumbnail for the post. Now it's easy ...
0
votes
1answer
16 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
17 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 ...
0
votes
2answers
379 views

How do I use featured images on index.php?

In 'Reading Settings' I have chosen the static-page drop-down menu of a page I created to be the post page. I've put the html, php, and css from my page.php in index.php to style it. I'm unable to ...
0
votes
1answer
20 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 ...
0
votes
1answer
22 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
20 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 ...
0
votes
2answers
443 views

Display Random Thumbnail from Category

I have a feeling that I'm on the right track, I just don't have enough solid PHP knowledge to get much further than where I'm currently at. I'm currently using the following code to return a list of ...
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 ...
0
votes
1answer
491 views

Random Category with Recent Post Title and Thumbnail

This code below works perfect to pull the title of five random categories, the issue is for each random category I want the latest post title and thumbnail but where and how do I add the post query? ...
1
vote
1answer
537 views

Secondary Featured Image Function (post_thumbnail)

Does anyone know if it is possible to add a secondary Featured image function to the pages and post editor?
1
vote
1answer
17 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
3k 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 = ...
1
vote
2answers
472 views

Issue where WP Featured Image will not display

The code I'm using, is outside of WordPress i.e. define('WP_USE_THEMES', false); require('blog/wp-blog-header.php'); global $wpdb; The code that I'm trying to display the post thumbnail (the ...
0
votes
1answer
19 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
2answers
432 views

How to make featured image thumbnails on index page load smoother?

I'm using a theme called Hatch Pro, which is a gallery based theme and the index page displays the posts using the featured image. You can see it here. On slower browser environments, the images ...
0
votes
0answers
10 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
29 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
15 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
26 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
20 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.
1
vote
0answers
12 views

How to change the attached image's name after save post? [closed]

I would like to let the user upload images with any name, and automatically modify their name to the format as %post_id%-01, %post_id%-02, %post_id%-03... when save post. And I'm using the plugin ...
0
votes
1answer
524 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 ...
1
vote
1answer
2k views

How I upload, save and set a featured image from my frontend?

I have a form in my site. This the user register one missing person. I created a custom post type missing person, custom taxonomies and custom fields. All this input's save as well in wp. But I ...
0
votes
1answer
484 views

Site not getting correct featured image from my query

On the home page of my site I have a series of tiles that link to various parts of the site. One tile links to the blog and I have written some code to pull the latest post with an image attached to ...
0
votes
2answers
508 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
1answer
124 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
41 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
30 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
1answer
375 views

Extract featured image from link mentioned in blog post

You ever notice Google News has relevant images associated with its headlines? How can I use WordPress to extract a featured image from an external webpage referenced in a blog post (or custom ...
0
votes
1answer
562 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 ...
1
vote
4answers
5k views

remove and disable image link in functions.php

Is there a way to disable image or thumbnail link URL, as well as remove existing image/thumbnail links in functions.php? NOT the setting under media as posted in this link, please.
0
votes
0answers
24 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 ...
1
vote
1answer
947 views

Archive show thumbnail

I want to show thumbnails next to my posts in archive page, however it only shows thumbnails if the posts has a featured image. So I want to show thumbnail for the image attached to the post, but I ...
0
votes
0answers
7 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
1answer
28 views

how to use first post image as thumbnail on wordpress

how can i set my thumbnail to use the first image on my post? most time i use bbcode( [img] ) to place images on my post, i want them to be use as well, have tried so many suggestion, but none meet ...
0
votes
3answers
639 views

get_the_post_thumbnail() returning empty string on custom post type

I've been brought in to help out with development on an existing plugin, and have run into a strange issue. Not sure if I'm overlooking something obvious here. The situation: I'm adding a shortcode ...
0
votes
2answers
615 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
0answers
21 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% ...
2
votes
2answers
168 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
24 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
vote
1answer
1k views

How to get Poster (thumbnail) Image of Video

I'm getting all videos using the function below and it's working fine. Now I want to get the videos Poster Image (Thumbnail Image) from that video. How can I get the video Image as thumbnail? I've ...
-1
votes
1answer
27 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
175 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
19 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 ...