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
11 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 ...
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 ...
0
votes
0answers
31 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
16 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 ...
0
votes
1answer
10 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
26 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 ...
0
votes
2answers
596 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
2answers
499 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 ...
1
vote
1answer
26 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
18 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 ...
0
votes
1answer
600 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
vote
1answer
37 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 ...
1
vote
1answer
912 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
2answers
739 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 ...
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 ...
1
vote
3answers
726 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, ...
4
votes
1answer
49 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
427 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
454 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 ...
0
votes
1answer
26 views

Featured Image not displayed

I noticed after I updated the WordPress, the featured images are now not displaying properly. Also the directory path is changed, the old path is like thiswww.example.com/files/filename and now the ...
0
votes
2answers
472 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
800 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
2answers
748 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
208 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
0
votes
0answers
16 views

Use remote image URLs as featured images/thumbnails [duplicate]

I'm working to migrate a site from Drupal (version 6) to WordPress (4.5.1). It has ~50,000 posts, almost all of which have one main image that appears in a large version on the post itself, and in a ...
1
vote
0answers
45 views

Display Featured Image On Hover in Seperate Div [closed]

Hi I'm trying to accomplish showing my featured thumbnail on hover. Here is a photo example. The photo on the left is the featured image for the first post on the right. I want first post ...
1
vote
2answers
28 views

Importing featured image to posts, duplicates the image

I'm using wp cli to import the same featured image for around 2,000 posts. I did a couple tests to see if the image would be duplicated or if WordPress would notice that the image already exists in ...
1
vote
2answers
31 views

Show featured image as background image from postQuery

The code below gets the image but I want it to be a background image. I believe I need to save the image as a variable first and then echo it out somehow. My PHP is not great so please give an example ...
15
votes
5answers
8k views

How can I make add_image_size() crop from the top?

I have a series of posts, all with featured images, but I need to be able to customise the crop top right corner. In this instance, I need them to be cropped from top right, but it would be useful to ...
1
vote
1answer
639 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 ...
-3
votes
0answers
39 views

how to add thumb from homepage or category page to rss feed?

I have a wordpress website that embeds videos from other top video sites. I want to add the thumbnail URL code into the RSS feed. My main index code: http://pastebin.com/RaAvW9PR I have tried ...
0
votes
1answer
9 views

Recent posts with featured image or fallback image with permalink

In my sidebar.php I have some code that prints the recent comments. I could not share the complete code here because of the formating restrictions. You can find the code here: ...
1
vote
1answer
30 views

Original image not saving?

When i'm uploading a picture, WordPress doesn't save the original image, just the thumbnails? That's why when i'm setting a featured image, the link is broken. Any help to to save the original image ...
1
vote
2answers
96 views

Featured image fallback link to permalink

I use this to display the featured image for each post. If the post does not have a featured image, a generic image will be displayed: <?php if ( has_post_thumbnail() ) { echo '<a href="' . ...
0
votes
4answers
57 views

What can I do if I set a gif as featured image? no thumbnail when i share on facebook

My website it's for sharing content with front end post and users can post images/gifs/youtube , if a user(or me) post a gif it's directly set it to featured image and when I try to share that post it ...
0
votes
0answers
42 views

How can i set thumbnail image as featured image?

Hy,as you can see in this code an image it's attachated to a post directly into featured image with this function update_post_meta( $post_id, '_thumbnail_id', $attach_id ); but how can i transform ...
0
votes
1answer
20 views

related author post thumbnail shows post thumbnail

using the code below to show 4 related posts from author <?php global $authordata, $post; ?> <?php $authors_posts = get_posts( array( 'author' => $authordata->ID, 'post__not_in' => ...
0
votes
1answer
22 views

Trying to show Wordpress category query result as background image

The code is working fine so far, but I want to show the post thumbnail as a background image inside the li tag. Been trying many variations, but can't work it out? Here's the code: <div ...
1
vote
3answers
64 views

the_post_thumbnail ignores size parameter

I'm inserting an image in my theme as follows: the_post_thumbnail('large'); Which results in the following HTML: <img class="wp-post-image" width="660" height="440" sizes="(max-width: 660px) ...
0
votes
1answer
23 views

Display recent posts with thumbnail

I have the following php in a template. This lists the most recent posts. <h2>Recent Posts</h2> <ul> <?php $args = array( 'numberposts' => '5', 'tax_query' => array( ...
0
votes
1answer
25 views

Remove Featured Images from Posts Older Than a Certain Date

I run a network of sites, with hundreds of editors, and lately we've had image copyright trolls coming after us. Most of these images are a year old or older, so we're looking to remove all images ...
0
votes
1answer
25 views

Remove Featured Image based on Date

I have an issue I can't seem to fold a solution for. I'm looking for a way to mass remove the featured images of posts older than X amount of days. 150 days is my target but if I can set it to ...
0
votes
0answers
18 views

get texonomy image from custom post type

Hello I have been using a wordpress theme called cliper it has a cpt called coupon with taxonomy like category and store and I am using a plugin http://zahlan.net/blog/2012/06/categories-images/ to ...
0
votes
1answer
2k views

Display featured image as post thumbnail

i'm trying to set up a mobile theme for my WordPress site. My desktop version uses themejunkie's weekly theme and my mobile version uses dotmobi theme. the Dotmobi theme pulls out the first image and ...
0
votes
0answers
16 views

why are images not full size?

when viewing images on portfolio page is not a problem, but if one portfolio in the open drawing that appears small, it requires some time so the image can be full size. Why did it happen,can you ...
0
votes
1answer
25 views

Error display post thumbnails for previous and next post

I managed to display the thumbnails for the previous and next post on my custom post type but I keep getting this error "Notice: Trying to get property of non-object in ...
0
votes
1answer
34 views

Add featured image programatically to custom post type

I am trying to automatically add a video thumbnail from Vimeo or YouTube as the featured image when a new custom post type video is add/updated. The video ID is an advanced custom field. Here's my ...
1
vote
1answer
48 views

Media thumbnail for custom post inside post content

Some media are added to the post but not inserted into post content. How to insert media into post content without doing it manually. I was able to find the following code to display the attached ...