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
30 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

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 ...
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
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 ...
-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
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
46 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
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
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 ...
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
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 ...
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 ...
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 ...
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
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
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 ...
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
0answers
21 views

Uploaded featured image dimensions being distorted

When I upload a 706 x 706 image to be a featured image of a WooCommerce product, the dimensions of this image, when visible in the featured image section of the product page are 810 x 9999. I can't ...
0
votes
0answers
16 views

How to get secondary image on blog page(reading->Posts page:) header

I have using "MultiPostThumbnails" and getting banner for all pages ut not getting for blog page when i have set (reading->Posts page). I have added this code on header. $current_page_banner = ...
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
37 views

add_image_size not working

I am trying to resize an image using either the following code: add_image_size('poster-full', 450, 9999, false); OR add_image_size('poster-full', 450); I need it to be resized widthwise, and height ...
1
vote
1answer
61 views

Wordpress hook that gets featured image from direct URL?

I use a lot of plugins on my site so I'm trying to minimize the amount more plugins. I was wondering if there's a wordpress hook I can use so that I can use an image that is hosted on imageshack and ...
3
votes
0answers
136 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 ...
0
votes
1answer
23 views

Troubles with code for upload a image

can someone give me please a code for image upload ? i try many but no one works , this is what i have : $post = array( 'comment_status' => $comment_status, ...
0
votes
0answers
59 views

Featured image does not work with images on a post at the frontend?

[Found a partial solution] I need a little help with this problem. I don't know why on my videos the theme uses a thumbnail and set it as featured image but for images it does not. When I install a ...
0
votes
0answers
25 views

some tweak to a upload featured image code

from three days in a confusing me with this problem , i have a code for publishing a post from front end for images and video, for videos he take the thumbnail and put in featured image but for images ...
0
votes
1answer
39 views

a tricky question about featured image

so i'm trying about 2 3 with this and i can't managed to make it work. I have this theme : Aruna and he has front end post and when i'm posting a image i need to write title and upload a image from ...
0
votes
2answers
52 views

wp_get_attachment_image not to get the post_thumbnaill

I have a setup, where I want to achieve that I have a big Picture of a product (Post-image), and then below a list of other thumbnails, which can be opened in a Lightbox. I made this, by querying the ...
0
votes
0answers
40 views

Featured Image with External Link on click

Hoping someone can help me here, Im trying to edit a plugin which has a custom post type called https://wordpress.org/plugins/custom-post-widget/ On line 110 of the file : ...
0
votes
1answer
24 views

Display Page featured Image as well as Posts featured Image

Ok, I have hit a bit of a roadblock. I have a page that has been set to display the posts (which have their own featured images). I tried calling the posts featured image in the loop (which worked), ...
1
vote
1answer
12 views

Randomly Assign an Image's Alt Text Based on Data From Post

I would like randomly assign an image an alt text based on taxonomy entered by the user on a post that the image is attached if there is no alt text entered. For example, on a post that has an image, ...
1
vote
1answer
12 views

Output post thumbnail (add class)

I'm using the following to output the post thumbnail as a marker on a map. $thumb_id = get_post_thumbnail_id(); $thumb_url_array = wp_get_attachment_image_src($thumb_id, array( 100, 100), true); ...
0
votes
1answer
19 views

retrieve custom post image through widget

My custom post has featured image. I need to retrieve it through widget. I am using get_the_post_thumbnail. But it is not working. Except this the rest of the widget is working fine. Here is the ...
0
votes
2answers
33 views

It does not work concatenation in function.php

I want to put a variable between two tags, but it puts him out. This is my function: (function.php) /* traer thumb */ function item_thumb() { global $post; if (has_post_format('video')) { ...
1
vote
1answer
20 views

How can I use a static (ish) URL for the featured image for a post?

I want to store all my featured images on S3, and then use imgix transforms to display them. So basically, instead of Wordpress inserting: ...
1
vote
1answer
26 views

Filter post_type thumbnail in Search result

it's my first question on Stack network so let me know if something wrong in the use of this. I have a theme with these pieces of code: /** * Get the Featured image URL of a post * @global object ...
1
vote
2answers
40 views

Different excerpt styles per category, but chronological

I want to have different sized previews for different kinds of work I've done. Say 100x100px for regular stuff, but 200x200px for a bigger project. I figure I can use category to sort, and I know how ...