Tagged Questions

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
9 views

Thumbnail With Next/Prev Links Not Showing Next Post?

I am using the below code to display thumbnail with next/prev posts links on single.php page. It is working fine when next and prev post are from same category but not showing the next or prev post ...
0
votes
1answer
16 views

Change theme's thumbnail to cropped WP featured image

The theme I'm using, when browsing a particular category, displays the full featured image (even if it's more than 1000px high), resized to max-width:20%. However, I'd like it to display just a ...
1
vote
1answer
17 views

Set the background to a default image if there isn't a specified “featured image”

I am having a little trouble displaying a default image as a background image when a feature image is not present. This is the code I am using <?php if (has_post_thumbnail( $post->ID ) ): ...
1
vote
1answer
30 views

ReOrder Post Within Categories plugin with featured image

I need to add featured image somewhere near title so I can easier sort them, currently the plugin use this code to show the title only, tried with the_post_thumbnail and nothing is showing up. Thank ...
0
votes
0answers
24 views

Lazy Load sometimes don't work

recently I implented lazy load script into my wordpress blog through query posts. Well it is working, but sometimes javascript will not just work. Actually I have these images in sidebar aka images ...
0
votes
1answer
18 views

custom thumbnail image size not working

I added below code in theme's function.php add_theme_support( 'post-thumbnails' ); add_image_size( 'thumb-small', 200, 150, true ); and <?php the_post_thumbnail('thumb-small'); ?> ...
0
votes
0answers
17 views

Can't update/save featured image

I have a site that for some reason I can't seem to save a featured image to the post. When I set the featured image, it pulls it in fine - however when I hit "save" then the image disappears. Does ...
0
votes
1answer
20 views

Retrieve featured image as object

I want to retrieve the featured image of a post as an object (array) in order to have all image sizes available. The get_the_post_thumbnail() function doesn't do this, any ideas?
0
votes
0answers
36 views

Add Featured Image from Existing wp-content folder

I am using a Tube plugin that is creating my posts and pulling in thumbnail images that it is using on the main page to link to the posts. While it is creating and displaying thumbnails these are NOT ...
0
votes
0answers
19 views

Scale image down or resize image to fit on featured image thumbnail

I'm having a problem with the image scale. it doesn't fit meaning it crops to fit the container. how do you set it to resize it proportional with the container? if someone can help, please do. still ...
0
votes
1answer
37 views

Autoblog posts in wpms(network) into main site including featured images

I've a scenario like this: Blog writers, write their content into their blog and whichever post that they'd like to be seen in the main site should include the category 'Featured' (they're ...
0
votes
1answer
20 views

Comparison Operators not working for conditional author post thumbnails

I'm trying to place the default featured image on the blog index page with an image to be determined by who the author of the post is. For some reason I'm getting the image for $author_id=2 even when ...
0
votes
1answer
43 views

Featured Images missing on migrated site

I have just moved my blog from one host to another. I did this using the standard import/export method and got the new installation to copy across all the attached images. The only difference is that ...
0
votes
1answer
35 views

How to get post thumbnail to be equal to set media size

I'm new to learning WP theme development so I may not have worded the title perfectly but that's the best way I could think to explain it. My theme is on a localhost so I can't link to it but here is ...
0
votes
0answers
20 views

Scale then crop image during Post Thumbnail upload

I'm currently building a theme that has a full width slider displaying each post's thumbnail. In order for each picture to be at the same size, I'd like WordPress to automatically scale up/down to a ...
0
votes
1answer
20 views

Apply height and width for the_content() inside youtube video tag

I am displaying video and content form this function the_content() for this am using you-tube [embed] link. How can i give height and width ??? Also, I am using the_post_thumbnail() for image it to ...
0
votes
0answers
18 views

Thumbnails produce unwanted gray pixels on white background

Is there a workaround for producing QUALITY "Featured Image" thumbnails of different sizes? WordPress produces compressed thumbnails that contain grey pixels where it should be a completely white ...
0
votes
1answer
34 views

Issue on Getting Custom post type Thumbnail's URL

I need to get the URL for Custom post type Thumbnail and assign it to the_post_thumbnail('', array('class' => 'group1 img-responsive', 'href' ...
0
votes
1answer
51 views

How To Pick Custom Size Of Uploaded Image In Theme Via the_post_thumbnail();?

I am designing a magazine style theme and I want different image sizes as to show on index.php page. Now for this, I am using <?php the_post_thumbnail( array(100, 100) );?> but it is picking ...
0
votes
1answer
28 views

Add theme support for post thumbnails

I created a custom post type called products without support for thumbnails because I want to add the support for post-thumbnails in functions.php file. So I use after_setup_theme action hook and use ...
0
votes
1answer
29 views

Post thumbnail won't resize to fit

Below is the code i used to set my thumbnail sizes. The Only problem I'm having is that my thumbnails won't resize to fit the size below or the <div> add_theme_support( 'post-thumbnails' ); ...
0
votes
1answer
53 views

How to pick “full/thumbnail” images in the loop?

I am picking the latest posts through the WordPress loop using the below code, but it's picking all images at full size: if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> ...
0
votes
0answers
21 views

How to correctly add the featured immage (thumbnails) support in a WP theme? Why I can't add a featured immage?

I have developed this custom WP theme: http://www.asper-eritrea.com/ As you can see into the post excertpt (in the home page) it is showed the first immage into my posts. To do it I use this code: ...
0
votes
1answer
34 views

Product Images Low Quality After Updating From WP 3.5 to 4 [closed]

I recently updated my WP website from WP 3.5 to recent version 4 and now I am getting a lower quality of all product feature images. I am using woocommercee to generate an online shop and it was ...
0
votes
0answers
20 views

Get default post thumbnail from custom field

This is default post thumbnail code add_filter( 'post_thumbnail_html', 'my_post_thumbnail_html' ); function my_post_thumbnail_html( $html ) { if ( empty( $html ) ) $html = '<img src="' . ...
0
votes
0answers
15 views

Featured Image saving before updating post

Tell it's not just me; I'm almost sure it isn't, but I couldn't find anyone else talking about it. I disabled any plugins to confirm this. When editing a published post, adding or removing the ...
0
votes
2answers
65 views

Theme stops media uploader from working

I took over a website from a previous developer that built most of the site. Because the theme was a custom one, he chose to do it using Toolbox. The site has been standing for just over a year, and ...
0
votes
0answers
34 views

Setting image attachment caption, description, and alt text programatically

In an attachment post, which post fields correspond to the attachment's caption, description, and alternative text. I cannot find any documentation on this relationship, and I am trying to get ...
3
votes
1answer
133 views

In loop: posts have thumbnail AND other variables

I am looking to display posts that meet certain requirements. First and foremost, the idea is to show visitors the most viewed posts. I implemented that with some help. So, I got that working with the ...
0
votes
1answer
27 views

the_post_thumbnail() doesn't always return selected size

In my theme's archive template, I'm using the_post_thumbnail('list-thumb-small'); to get a specific thumbnail size for each post. But that doen's work on all posts. Some posts display their ...
0
votes
0answers
25 views

Sharing a photo post on facebook sometimes results in a grey thumbnail

On my facebook page some of the thumbnails are partially or completely greyed out: https://www.facebook.com/ohokphotos My first suspicion is that this occurs when facebook fails to completely load ...
0
votes
2answers
34 views

upload image only

I create post page from front end , and i add code for uplaod feature image. I use this code if (!function_exists('wp_generate_attachment_metadata')){ require_once(ABSPATH . ...
0
votes
2answers
38 views

Trouble Retrieving Thumbnail URL on Front-Page

I'm running multiple queries on a front-page.php file. They all seem to be working fine, except that I am having a hard time getting a thumbnail image. The code in question, on my front-page, ...
0
votes
4answers
53 views

Post thumbnail height problem

I am trying to create a square thumbnail with auto crop with size of 300px 300px. I only get the width of 300px but the height is auto, i think is not cropping. I tried this: add_image_size( ...
4
votes
1answer
62 views

Prevent WordPress from cropping GIF files

Is there any way to prevent WordPress from cropping files based on their file extension. Actually, I want to disable cropping for GIF files because after cropping GIF image... GiF image does not ...
0
votes
0answers
31 views

4.0 Media Uploader Customisation

Does anyone have/know of any guides or tutorials that break apart the different hooks and sections of new improved the media uploader? Specifically, I'm looking to add a new tab to between the ...
0
votes
1answer
28 views

How do I get thumbnails?

Today I set up my Wordpress blog I used the hueman theme I looked at my posts page And there were blank images with cameras in the middle of them So I guess there thumbnails How do I get them?
0
votes
1answer
37 views

How to set uploaded image as featured image wordpress

How do I set an uploaded image from form to be the featured image of the post. Here are the basics of my code: User fills form and uploads image. Submitted form data appears as a custom post type. ...
0
votes
1answer
35 views

Generate responsive post thumbnails of same size

I am using a function to display related posts in my wordpress theme with their thumbnail. I am using uikit to make my theme responsive. Uikit offers a grid feature similar to the bootstrap one, and ...
0
votes
1answer
43 views

Removing URL and adding container around image in the featured image metabox

I want to remove the url and add a container(div) around the image in the featured image metabox. Wordpress output <p class="hide-if-no-js"> <a title="Set featured image" href="URL" ...
0
votes
1answer
47 views

Resize Admin Featured Image Thumbnail in CPT Edit Screen

I have a custom post type for a slider and I'm using the Featured Image thumbnail uploader to set the image. I've relocated the Featured Image meta box to be underneath the title section in the ...
0
votes
1answer
25 views

Upload image from a URL and assign it as a Featured Image to a Custom Post Type?

I am 90% done building a plugin that uses the Amazon.com API. What I have built is a Books Custom Post Type. My Books CPT has Custom Taxonomies for Book Category, Book Tags, Book Author, and Book ...
0
votes
1answer
41 views

Copy wp_postmeta from one database to another

I had a site setup on old-domain.com, which used the database old_db. Recently, we had to migrate our website to a new server and domain, new-domain.com which uses the database new_db. I installed a ...
0
votes
1answer
42 views

How to Make Thumbnail of Post Stay Animated

When I upload my post with an animated .gif, the thumbnail generates into a new image and doesn't stay animated. It will stay animated inside the post which is great. It seems to resize the .gif image ...
0
votes
1answer
54 views

adding image to post thumbnail from another server

i have a image gallery site, each post in site have thumbnail and image in post, now i want get file server for uploaded image. how can i add thumb image from another server? or how can i change the ...
0
votes
1answer
74 views

Backstretch.js and thumbnail sizes to reduce loading time

I am using backstretch.js to set a featured image as a full size background image (as per this tutorial). I would like to combine this approach with different thumbnail sizes in order to reduce ...
1
vote
1answer
57 views

Can't show custom post thumbnail sizes as background images

I'm trying to work out a solution for responsive background images in Wordpress to use on my clients' sites. This is what I got: 1) I created some custom thumbnail sizes: function ...
1
vote
1answer
57 views

Confused with the loop and repeating things

In my HTML mock up, the idea is to have a thumbnail side by side and I'm doing that by using this code: <div class="jumbotron"> <img src="<?php print IMAGES; ?>/th1.png" ...
1
vote
1answer
103 views

How do I remove featured images and captions from a wordpress RSS feed?

I'm trying to remove featured images and captions from my feed and struggling to do it. As another question has identified it is very difficult to format captions and so as a newsletter feed I want to ...
0
votes
1answer
41 views

query to update post with featured images from array

I have 100 existing posts of a custom post type that I need to update their featured images... How would I go about creating a query to randomly update these images from an array of say 20 images from ...