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
0answers
13 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 ...
0
votes
1answer
17 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 ...
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
17 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
39 views

Basic PHP question (displaying post title over thumbnail)

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: ...
0
votes
1answer
634 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 ...
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
501 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
612 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
45 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
7k 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
123 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
11k 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
940 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
0answers
22 views

featured images not showing in the main blog page [on hold]

featured images not showing in the main blog page, (masonry layout), but show in each post individualy,I dont think its a problem of the images path , because as you can see in the main blog page (see ...
0
votes
1answer
437 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 ...
1
vote
3answers
1k 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, ...
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
29 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 ...
0
votes
1answer
465 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 ...
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
2answers
476 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
40 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
41 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
2answers
768 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
21 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
14 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
1answer
34 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
46 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 ...
1
vote
0answers
49 views

Wordpress not cropping thumbnails properly

For some reason Wordpress is ignoring my thumbnail sizes and keeping thumbnails cropped proportionately instead of specific dimensions. Here is what I have in my functions.php: add_image_size('main-...
1
vote
2answers
89 views

Trigger JS in custom meta box if a featured image is loaded/exists

Playing with WordPress customization I created a meta box with several others that report back details of the post. One meta box evaluates the featured image but I am having trouble figuring out how ...
0
votes
2answers
22 views

Newly uploaded images are not updating in featured image

Using the google page speed test I saw that some images were too large and needed to be resized. I used the ftp to download the necessary images, resized them locally, and then used the media upload ...
0
votes
0answers
34 views

How to set featured image from external url without downloading image [duplicate]

I want to set featured image of my post from external url and without downloading, I am using auto-post-thumbnail to generate featured image, but it save image to my server. Is there any method to do ...
3
votes
2answers
12k views

Featured Image Panel Missing From Custom Post Type in Wordpress 3.2

Upgraded to 3.2 from 3.1 and lost the featured image panel in admin that was running in a custom post type. add_action( 'init', 'create_my_post_types' ); function create_my_post_types() { ...
0
votes
0answers
27 views

Exclude Featured Image Attachments from Wordpress Search Results

I'd like my search.php page to show all attachments except featured images (because they appear as duplicates of the posts that use them). I have seen some examples that do this for a query, but can'...
0
votes
1answer
13 views

Genereate widescreen featured images in different sizes

Please bear with me here: With the thumbnail function we can define a hard crop when an image is uploaded. That's great for when I have a thin and narrow widescreen image (say 1280px by 300 px ) as a ...
0
votes
1answer
29 views

WordPress PNG compression issue

I'm having issues with images getting badly compressed when uploaded to my site. It's not an issue with photographs, but is very noticeable for images with solid blocks of colour and text. I've ...
1
vote
1answer
27 views

Set spesific size of featured images

I am trying to reduce the loading speed of my webpage. Google PageSpeed Insights tells me to optimize my images. In the following code, how can I set an image size so that if the uploaded image is ...
0
votes
1answer
20 views

How to set an attachments parent post id in code?

I've inherited an imported wordpress site with a few issue. I have a list of attahment ids and post ids but I need to re-connect them in the code. I've got a list of all attachemnt like this: $...
0
votes
0answers
7 views

How to set specific image as thumb for other image?

I have two images: http://localhost/small.jpg, http://localhost/big.jpg. I upload them via media handle sideload. Is it possible somehow assign small.jpg image as thumb for the big.jpg that I could ...
1
vote
1answer
41 views

How can I add pagination and how can I change thumbnail size?

I'm currently learning wordpress development and I try to add pagination which displays a "older"/"newer post" link and the number of the current page at the bottom of the posts. I also try to change ...
2
votes
2answers
763 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 ...
4
votes
1answer
52 views

How to limit number of images being printer out in “Set Featured Image” pop up?

I have wordpress web site which contains over 150 000 images and when you click on "Set Featured Image" whole server slows down. Another thing is that it take a really long time to load images. Is ...
0
votes
1answer
894 views

Animated Gif as Featured Image

I am wanting to upload animated gifs to my website and use them as the featured image. I have a couple of questions. Firstly...how do I stop wordpress from automatically resizing the image when I ...
0
votes
1answer
240 views

Featured Image not displaying in a page

I put featured image in a page but it's not showing up when I view the page. But in thumbnails its showing up. How to fix this? here http://www.homecredit.ph/betasite/promos