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
1answer
668 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 ...
0
votes
2answers
477 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
1answer
448 views

How to get featured image thumbnail to open larger version in attachment page?

I have a thumbnail of the featured image, which is linked to a larger version of the file. At the moment the file just opens in a standard browser window, but I would like it to open in an attachment ...
0
votes
1answer
421 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 ...
-1
votes
0answers
9 views

display images related to product image (woocommerce plugin) below description in single product page

I have a wordpress site running the wordpress plugin WooCommerce and also I use image category plugin to manage my images. I am trying to display all the images having same category as that of ...
0
votes
1answer
410 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') { ...
0
votes
1answer
408 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 field)?...
4
votes
1answer
363 views

the_post_thumbnail responsive srcset not populating with custom image size

I am trying to use the new responsive images feature in Wordpress 4.4 but I keep running into a particular problem when trying to use the_post_thumbnail with a custom image size. It seems I cannot ...
-2
votes
1answer
27 views

How to crop featured image in different sizes?

I have a Wordpress theme which require 4 images sizes: small: 960x535 medium: 1380x770 large: 1920x1071 full: 2240x1361 Is there a way to crop the featured image into these sizes so I can use them ...
0
votes
1answer
49 views

Query posts only without featured image

want to query 100 posts, but only those which do not have a featured image attached. I am using meta_key method for this with WP_Query as such: $args = array( 'post_type' => 'post', '...
-2
votes
1answer
42 views

Get Thumbnails and Thumbnails URL from Media Manager

I need to insert several thumbnails generated from featured images in html, to use them in a slider that I've built. I can't get the thumbnail size via PHP because it breaks the code module (I am ...
1
vote
1answer
975 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
1answer
32 views

unable to show custom post type featured image

I am trying to get the featured images of custom post type images. I am using this code. All of my posts have images but I am unable to show. <?php $posts_array = get_posts( array( '...
1
vote
3answers
2k views

wp_get_attachment_image_src always returns full-sized image

https://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src#Parameters leads me to believe wp_get_attachment_image_src( $thumb_id, array(100, 100) )[0] would return a 100x100 thumbnail, ...
-2
votes
1answer
40 views

How to stop WordPress from creating native thumbnails?

Stop use thumbnail native image - one major issue, I want Use cache image thumbnail inserted of native image, its create junk on web-space e.g If I upload one product its make 3-6 thumbnail image ...
0
votes
0answers
54 views

Thickbox Opening IFrame instead of Featured Image

I am trying to open the featured image on the single post page in a WP Thickbox, but it's opening the entire post in an iframe. Here is my code: <?php if ( has_post_thumbnail()) : ?> ...
0
votes
1answer
2k 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
30 views

IF statement to filter featured image article

I need the frontpage show article that has featured image. If the article has featured image uploaded, display it. If the article has no featured image uploaded, not display it. I searched online, ...
0
votes
1answer
469 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 ...
10
votes
5answers
18k views

Stop wordpress from hardcoding img width and height attributes

I'm wondering if there's a simple way top stop WordPress automatically hardcoding featured image height and width attributes, other than using regex... As I'm using a flexible grid for my project (...
0
votes
2answers
792 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
12 views

Use default image as var

I would like to use a default image if there is no thumbnail. The image needs to be output as $image. But I can't work out how to use the image path to the default image. if ($locimage) { $...
3
votes
3answers
5k views

Remove the Featured Image Meta Box

How can I remove the Featured Image meta box? I've tried using the remove_meta_box function and specifying the boxes ID but it doesn't seem to work like it does for the other native meta boxes. ...
0
votes
2answers
2k views

media-library: how to insert thumbnails with a fixed width, regardless of landscape/portrait orientation

I've asked a similar question before. This one is related, but different. Right now: if you insert an image in a post as a thumbnail by the media-library, you can choose between 4 different sizes: ...
0
votes
1answer
25 views

Custom field as featured image caption

The problem is: My featured image caption is not being shown since it is (still) stored in a custom field (called (wpcf-bildunterschrift). I can easily access the customfield, but not the field that ...
0
votes
0answers
26 views

Add alt text to image posts using XML-RPC/functions.php

I am using the following part of code to upload images using xmlrpc: $content = array( 'name' => $title.".".$ext, 'type' => $type, 'bits' => new ...
2
votes
1answer
655 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 ...
2
votes
1answer
2k 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 ...
3
votes
2answers
5k views

Retrieve 1st image in post and set it as featured image, when post is saved/updated

I need to set a featured image for every post I publish. So, when a post is published/updated, the script would scan the post for the first image using a script like this: // Get URL of first ...
0
votes
0answers
21 views

Newly Uploaded Images Don't Scale Properly in Featured Images

It took me a bit to figure out what was going on, but here it is.... When I create a new post, and add a featured image to it, the image doesn't scale properly, like they used to. On the home page, ...
0
votes
1answer
44 views

Basic PHP question (displaying post title over thumbnail) [closed]

I'm new to PHP so excuse the vagueness of this question. I am using a plugin called WP-Tiles that takes a group of posts and displays them in a grid. I'm calling this grid with the following function: ...
10
votes
9answers
9k views

How to automatically add rounded corners to thumbnails?

I want to created automatically rounded corner thumbnails for a particular project I'm working on, using something like this: http://webdeveloperplus.com/php/create-thumbnail-images-with-rounded-...
0
votes
1answer
389 views

Thumbnail Image Rounded Corners w CSS (or any other good method)

I've been researching how to display thumbnails with rounded images, but every solution ends up running out of gas. One trick I tried was wrapping the thumbnail in a division with the same size and ...
1
vote
2answers
502 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
2answers
624 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 ...
0
votes
1answer
51 views

How to create a thumbnail with php?

I am creating posts using wp_insert_post(), but these posts do not have featured images. I have a post ID, and a path to the image on my server, how do I set them as the featured image? EDIT : I ...
5
votes
3answers
8k views

How to set featured image to custom post from outside programmatically

I am trying to fetch and insert images outside the wordpress environment to a custom post via PHP. How to move/upload that image to wordpress upload directory year date folder format just like ...
0
votes
1answer
124 views

featured post as div background

Ok I didn't find an answer yet.. because my code is different.. I want to set the featured image as the div's background but I don't know how to do that.. html, php and css collide in one line.. This ...
6
votes
3answers
12k views

Get first image in a post

I am using this code directly from the codex. function echo_first_image ($postID) { $args = array( 'numberposts' => 1, 'order'=> 'ASC', 'post_mime_type' =>...
1
vote
1answer
3k 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
35 views

Post Title to featured Image ALT

i saw a interesting post on Stackoverflow where someone showed a code to to use the post title als alt tag for the featured post. So i tried to use the code for myself and change it a bit because mine ...
3
votes
0answers
34 views

Wordpress crops some thumbnails but not others? [duplicate]

For some reason Wordpress is cropping some of my thumbnails proportionately rather than to specific dimensions for some images, and cropping them to specific dimensions for others. I want it to crop ...
2
votes
2answers
6k views

Add Title Attribute to WordPress Image the_post_thumbnail

i use this code to show post's thumbnail in my site but this code cant show the title Attribute of the thumbnails. how can i add Title Attribute to WordPress thumbnails? <?php if ( ...
4
votes
2answers
3k views

get_the_post_thumbnail() doesn't taking style attribute

This seems to be an easy one but its giving me quite a hard time. get_the_post_thumbnail() suppose to take attribute as an array. Well, everything working right but when i pass style attr its doesn't ...
0
votes
1answer
51 views

How To Add and Display Category Image

I have created a WordPress plugin to create a widget area to display category names (total nmbr of post) and description.Now I want to show the category image just after the category name and after ...
1
vote
1answer
43 views

Different Featured Images depending on context: loop or single view

I want to keep different image on the single post type page and a different image if the post type is showing in a loop. Is there any way? Perhaps we can use the gallery image as featured on single ...
0
votes
1answer
22 views

Category page with thumb is ok but can't do the same with tags

I got a wp theme that can display a category page with thumbs (of posts) $cat_args = array( 'orderby' => 'name', 'order' => 'ASC', // 'number' => $num, 'child_of' =&...
0
votes
1answer
17 views

Showing featured image of page's child's children page

so i have a page that has children pages acting as categories, that each have children pages themselves (parent > children > children of children). How would I go about showing the featured images of ...
-4
votes
0answers
42 views

Regenerate thumbnails in S3 bucket

I am running a multisite wordpress website and all the images are uploaded to S3 bucket. I would like to change the template I am currently using with a new one. The problem is that all the old ...
0
votes
1answer
47 views

How to change thumbnail src attribute?

I am working on a plugin that can generate a thumbnail from a URL, getting the first image from posts; it is similar to an auto thumbnail generator. I get all img tags, but the URL is changed. Here is ...