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

get_post_thumbnail_id /set_post_thumbnail not working

i have a field called bookname and based on the entry in that i am trying to check the posttype = books and pull out the logoid when the bookname matchs but for some reason get_post_thumbnail_id ...
-3
votes
2answers
26 views

Theme:Twenty Fourteen, How to remove featured image on single post page for particular category

I found similar questions to it but none was an exact match to my question. I am using featured image in all my posts. I want to remove featured image on single post view from a single category (Say ...
-3
votes
0answers
16 views

Customize slider shows on the single product page

I have attached a picture to show the problems I faced. the slider(or maybe other element) take too much area in the product page. i need to alter the dimensions of this element for good appearance ...
0
votes
0answers
10 views

Featured Image a Background with Blog Post Info via JavaScript Loop

I want to create a section on a website with a featured image as the background. Over the image I will display the blog title, author, comments (if any) and a "Read More" link. I want to use an array ...
1
vote
2answers
28 views

Generate image for newly added size

I have added a new image size to a wordpress site with lots of images already present with all their thumbnails. Is there a way to do this: given the post using a specific image, get the attachment ...
0
votes
1answer
39 views

Customize Facebook's sharer.php to pass metadata of wordpress post (thumbnail and title)

I created FB Share button for wordpress post but it does not fetch the metadata from the post. I would like get the thumbnail and the title of the post when clicking share button. Here is the code I ...
-1
votes
1answer
29 views

How to display a post's Featured Image using the below code?

foreach ( get_posts( $category_three_last_posts ) as $post ) { // Add sub menu item $post->menu_item_parent = $item->ID; $post->post_type = 'nav_menu_item'; $post->object = ...
0
votes
0answers
14 views

Why will featured image show on some pages but not on other pages using the same template?

Why do some pages have a functioning featured image showing in the sidebar while some pages with the same template and even with the same image don't show the featured image in the sidebar but still ...
0
votes
1answer
19 views

Looking for Add Title Tag on Feature Images on WP

I am facing problem with adding title tag on feature images and also thumbnail posts. I tried to find out but not successful to resolve these kinds of issues. Kindly help me please how to add title ...
0
votes
1answer
16 views

How do I add a default thumbnail to elseif when no get_field('photos'), and no post thumbnail exists?

I am using advanced custom fields pro to display an image if the option exists. If the option does not exist then it will look for a post thumbnail. I already have this code and it's working however I ...
7
votes
1answer
169 views

How to change image type for specific size?

I am optimizing a site with large (dozens) quantity of images on page in a grid. For retina support the images are also need to be 2x sized. The low hanging fruit was to make sure the thumbnail sizes ...
0
votes
2answers
25 views

if statement for featured images

I'm just looking to make sure my home page and pages display my featured image if set, and other wise if not set show blog-banner.jpg. So that's what I thought I had however now my 404 error page ...
0
votes
1answer
41 views

How to set post thumbnail size?

I want to smaller my post thumbnails from 825px to something like 150x150. I'm using the newest version of wordpress and the "sark press" theme. So this is my code: sarkpress-function.php <?php ...
0
votes
1answer
56 views

Programmatically set thumbnail via URL using DOM and XPATH - Where to add ELSEIF

EDIT3: I have gotten some outside help and have totally changed my code around to now use xpath to select the div instead of using the nth img from the html source. I am happy to say this is working! ...
0
votes
0answers
37 views

Force Regenerate Thumbnails Not Working

Alright so I'm writing a new theme for my blog and i've decided to change the size of large media from 640 to 820. I have used the force regenerate plugin and updated the media settings so that large ...
6
votes
2answers
181 views

Generate Thumbnails only for Featured Images

I would like to know if there is a simple way (custom code or plugin) to create thumbnail sizes only for images that I intend to use as featured images (index.php, archive.php, etc.) , but not for the ...
0
votes
1answer
23 views

How to add posts with thumbnails to my dropdown menu?

I want to create the same effect in Listverse menu. I have a dropdown menu, and I want to add a post section with thumbnail, as shown in the image below. How to achieve that? Thanks!
0
votes
0answers
29 views

WordPress Page Walker class descendants of parent with thumbnail and custom classes

Please, help! I'm at my wits end and have to finish this by tomorrow, so I would REALLY appreciate any help with adjusting this page walker class. (Please!) The ultimate goal is to display a list in ...
0
votes
0answers
13 views

the_post_thumbnail attached to wrong post in archive

I'm using this code to get the image from post_thumbnail and displaying it as a background, however, once I place it in the archive page, I get a strange behavior: thumbnail for post 1 is empty, then ...
0
votes
1answer
49 views

Wordpress wp_get_attachment_thumb_url full

My code in index: (show all attachment by one post ID) <?php query_posts('p=1498'); if (have_posts()) { while (have_posts()) { the_post(); ?> <?php $args = array( 'post_type' => ...
0
votes
1answer
23 views

Unrestricted height thumbnails

I have set my default thumbnail size in settings > media, however as I see it you Have to add a value. However, I'd like to specify a width, but allow for an unrestricted height. For instance, both ...
0
votes
0answers
27 views

Custom image size in the_content loop

I changed the default image dimensions for the "large" thumbnail and re-generated my images using a plugin. The new image size is only shown on new posts created after the image size was created. How ...
0
votes
2answers
32 views

How do I get the URL of a specific size featured image?

I am using <?php wp_get_attachment_thumb_url( $attachment_id ); ?> to get the url of a thumbnail for a post in Wordpress. However I would like to retrieve the URL of a specific size image. So ...
0
votes
1answer
57 views

Find posts without featured image? [duplicate]

I need way to find post(s) without featured image set. I use WP as gallery site and for every post I set featured image. I wish to check if there is any post(s) without featured image. Any code to ...
0
votes
2answers
32 views

News and Featured image

I am trying to list my news items in 3 columns in a vertical design: image, date, title. I'm having some trouble calling the featured image. Is there a specific function that would help me with this? ...
0
votes
1answer
75 views

Get featured image on hover of post title [closed]

I need to get respective featured image on hovering of post title is there any plugin to achieve this I tried geting this by using Js and CSS but failed to achieve.Searched through Googe and WSE too ...
0
votes
0answers
36 views

Does not show thumbnail in a given category

I am creating a loop with two formats for posting , one is the default post and the other is a video post using the post-format (video) . I found right here a function to capture and save thumbnail ...
0
votes
0answers
13 views

Featured image for a third party application

I'm building a Phonegap application that retrieves posts from an existing WordPress database. In which way featured image (i guess it's in wp_postmeta) is related to the post id and how is it ...
0
votes
1answer
34 views

How do you import images from a URL in your post?

I am looking to automatically set the featured image from a URL, I have a plugin that creates new posts and has a link back to the source website, I would like to be able to scrape that link for an ...
0
votes
0answers
33 views

Fluid width of thumbnails in 4 column grid

I'm trying to figure out how to make the featured images width fluid. I've got a 100% width container with 4 25% columns. The thumbnails will be presented in a div (.griditem). This is what i'm ...
0
votes
2answers
143 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
0answers
27 views

How to regenerate thumbnails when set featured image?

How to regenerate thumbnails like the follow screenshots?
0
votes
2answers
45 views

Wordpress generated thumbnails

I uploaded one image with size of 1920*1200 and I checked the backend Media options as followed Thumbnail size 150 150 Medium size 300 300 Large size 1024 1024 The upload directory was supposedly ...
1
vote
1answer
60 views

Overwriting Parent Theme's Image Sizes

I'm using Raw by UDTHEMES as a parent theme for a site I am working on. In the parent theme, there is the following image size: add_image_size( 'udt-full-width-image', 870, 490, true ); And I am ...
0
votes
0answers
19 views

Featured image on pages AND blog index. How to combine?

I want to display a featured image on all pages and on the blog index. I have two functions but I don't know how to combine them. Display on all pages: if ( $thumbnail_id = ...
0
votes
0answers
48 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
61 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
136 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
36 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
130 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
63 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
232 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 ...
1
vote
0answers
119 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
124 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
62 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
87 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
180 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
178 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
569 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
122 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 = ...