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
1answer
41 views

Confused with the loop and repeating things

In my HTML mock up, the idea is to have a thumbnail side by side and I'm doing that by using this code: <div class="jumbotron"> <img src="<?php print IMAGES; ?>/th1.png" ...
1
vote
1answer
22 views

How do I remove featured images and captions from a wordpress RSS feed?

I'm trying to remove featured images and captions from my feed and struggling to do it. As another question has identified it is very difficult to format captions and so as a newsletter feed I want to ...
0
votes
1answer
21 views

query to update post with featured images from array

I have 100 existing posts of a custom post type that I need to update their featured images... How would I go about creating a query to randomly update these images from an array of say 20 images from ...
0
votes
1answer
29 views

How can I retrieve a Featured Image thumbnail using only the Post_title?

Is it possible to get the Wordpress featured image of a post using only the post_title name? I know it can be done with post->ID but I only have the post_title name to work with and this is outside of ...
0
votes
0answers
17 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
1answer
54 views

Disable post thumbnails in Twenty Thirteen child theme

I've made a theme that's a child of the standard Twenty Thirteen theme. Twenty Thirteen displays post_thumbnail images at the top of each of my pages, and I'd like my theme to not do this. I could ...
0
votes
2answers
29 views

How to output placeholder image if no featured image set?

I am using the Multipostthumbnails plugin - https://wordpress.org/plugins/multiple-post-thumbnails/ And it has a certain naming convention to it. I know the usual way to output a placeholder if no ...
0
votes
1answer
14 views

Single Featured Image Repeating

I am attempting to create a listing of Blog Posts by Date(Month) and show the featured image for each. <div id="datePostTime"><h2>Posts for <?php echo get_the_date('F, ...
0
votes
0answers
9 views

Require featured image snippet not letting me Trash the post

There's a famous snippet which allows you to require a featured image on your post before it gets published, which is following: add_action('save_post', 'wpds_check_thumbnail'); ...
0
votes
1answer
19 views

get_the_post_thumbnail not working inside wp_get_nav_menu_items hook

if ( ! is_admin() ) { add_filter( 'wp_get_nav_menu_items', 'display_last_posts_for_menu_item_ts', 10, 3 ); } function display_last_posts_for_menu_item_ts( $items, $menu, $args ) { $menu_order = ...
0
votes
0answers
8 views

How do I set a featured image straight from the post text editor?

I'm dealing with a migration of 5,000 posts from a non-WordPress platform into a new WP install. I would like content managers to be able to open each past post in the admin, then merely click an ...
0
votes
0answers
13 views

Limiting where feature images are used

I would like to switch to a magazine theme that uses featured images, but I would like to limit where they are used. For the post page, I want to use a different lead image or the feature image but ...
1
vote
1answer
92 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
0answers
18 views

Is it possible to add a custom tab to the Featured Image Modal and if so how?

I tried using the media_upload_tabs filter but that didn't work. This question looks very similar to this Adding A Custom Tab To The Insert Media / Add Featured Image Modal but there that wasn't ...
0
votes
0answers
65 views

Set Featured Image not opening - Stuck at loading

I am unable to set featured image for posts/pages. The 'set featured image window' opens but never loads and thumbnails. Then I tried to upload the image using Media, it stucks at crunching. But ...
0
votes
2answers
34 views

Display Featured Image

I am having some issues trying to get featured image to appear on my front page. I am using Genesis, then genesis child theme. I only want the featured image to appear on my front-page.php. I know I ...
0
votes
2answers
133 views

Get a post's thumbnail url or display default image in shortcode

I'm trying to get my code to: Get a post's thumbnail url or (if no thumbnail there) to Echo a default url I'm not sure if I am going the easiest way or right way about this. This is the code so ...
1
vote
0answers
18 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
50 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
82 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
117 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
80 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
41 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
20 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
50 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
63 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
36 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
35 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
65 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
41 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
29 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
96 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
65 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
247 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
35 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
50 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
75 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
72 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
77 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
58 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
30 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
102 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
109 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
58 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
115 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
237 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
749 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
73 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
398 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 ...