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
0answers
31 views

Display Featured Image On Hover in Seperate Div

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
votes
0answers
19 views

Add more one post in one time

I have form, that can add more than one post to my web site like this:- <div class="postBlick"> <input type="text" name="wpmp_title_1" placeholder="Post Title" /> <input ...
0
votes
2answers
20 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 ...
0
votes
2answers
20 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
636 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
34 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
0answers
15 views

Featured Image not showing thumbnail - Easy Add Thumbnail

Using Easy Add Thumbnail plugin, when I add a new post, and Add Media, then select the media from the media library, the image never shows up in the image carousel. It looks like an image tag never ...
0
votes
1answer
8 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
26 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
90 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
47 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
34 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
0answers
3 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
19 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
19 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
41 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
704 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
21 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
2answers
584 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 ...
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
1answer
23 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
24 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
16 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 ...
1
vote
1answer
888 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
497 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
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
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
447 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
21 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 ...
1
vote
3answers
550 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, ...
0
votes
2answers
721 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 ...
0
votes
1answer
29 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 ...
0
votes
2answers
468 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
2answers
731 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
567 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
40 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 ...
-1
votes
0answers
68 views

How to convert first embedded image to a thumbnail

I have a photography blog, where I uploaded a photo to be inserted into the post. I didn't add a thumbnail, because the theme I was using added that to the post as well, which complicated the display ...
0
votes
1answer
48 views

Is it possible to preserve original images in order to change image size later?

I want to create a simple wordpress blog site. At the moment I will use a template, but I would like to develop my own afterwards. And I have one concern related to images. Current template has nice ...
1
vote
1answer
3k views

set_post_thumbnail_size not cropping featured images, but reducing proportionally

In my function file, I set the following: if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 150, 50, true ); } And in the ...
0
votes
2answers
36 views

Custom field picture instead of post thumbnail on category page

I'm trying to modify a theme to make it work with my custom fields (I'm using ACF for most of the data I put on pages) for a site with song lyrics on it. The original code was this: ...
0
votes
1answer
28 views

How to change thumbnail default size?

I have added the following code in my functions.php add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 150, 150); My posts display with a thumbnail with the 150x150 dimensions. ...
0
votes
3answers
1k views

get_the_post_thumbnail() returning empty string on custom post type

I've been brought in to help out with development on an existing plugin, and have run into a strange issue. Not sure if I'm overlooking something obvious here. The situation: I'm adding a shortcode ...
0
votes
2answers
24 views

Set post thumbnail as background

I have a single page for my products where all products get listed. This is how i've archieved it: <ul class="produkte"> <?php $args = array( 'post_type' => 'produkte', ...
0
votes
1answer
27 views

Why does the Hard Crop option Scale?

I have a number of custom image sizes. I noticed earlier, when I was publishing a new post, that the post image was cropped AND scaled. It is exactly the right dimensions.. but it isn't the portion of ...
2
votes
3answers
5k views

How do I add the featured image to the_content after the first paragraph?

My problem: I'm trying to create a filter that will add the featured image of a post to the_content, so that I can have the first paragraph of the_content displayed before this image. What I basicly ...
0
votes
2answers
29 views

How to change _wp_attachment_metadata specific value in SQL?

i had to resize a lot of existing images in my upload folder (around 1k). After reuploading them, Wordpress of course, doesn't recognize the new dimensions. My approach was to just change the size in ...
0
votes
1answer
29 views

Download button for Featured Image in every post - automatically

I want to add download button for featured image in every post automatically in WordPress with the usage of php files. I don't want to use shortcodes, custom html in every post or plugins, cause I ...
0
votes
1answer
418 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 ...