Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [post-thumbnails]

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.

1
vote
1answer
14 views

Create thumbnail size only for a few images?

I have a few posts that require their thumbnail sizes to be 1000x430. If I register this size and regenerate the thumbnails, it will create this size for all images in the media folder, if I'm not ...
0
votes
1answer
19 views

Using featured image of blog archive page

On my custom wordpress theme, I am using the featured image thumbnail for all of my pages to be the header of the page. I've created a page called "blog" and using it as the archive ( via settings ->...
-2
votes
0answers
7 views

Fill svg with thumbnail [on hold]

I try to fill an SVG with an image using pattern, like that : <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 370.75 318.57" preserveAspectRatio="xMinYMin meet"> <defs> &...
0
votes
0answers
15 views

Multiple Post Thumbnails Not Returning URL for Background Image

I've been using the Multiple Post Thumbnail plugin with my custom post types to use a secondary, smaller image on my archive pages, while I have a larger hero image in the header of the single post (...
0
votes
1answer
27 views

Remove Featured Image & All Media Uploaded to the Post

I found a solution of removing featured image related to the post when delete the post from this article but, I want to remove all the uploaded media also with post removing. Delete all WP image ...
-1
votes
1answer
14 views

Auto post creation

I've a problem in wordpress that I find automatic posts getting created.. I couldnt figure out what is causing that.. Is this can be from a plugin? You can see in the picture an example of those posts ...
0
votes
0answers
33 views

How to programmatically set existing image in media library the featured image for a post in wordpress

I have uploaded some images to the wordpress media library. Now I am going to create some posts using php and want to use those already uploaded images as featured image for these posts respectively. ...
1
vote
1answer
26 views

How can I add a “data-pin-nopin” the featured image html?

I really want to prevent my featured images from being pinned. It seems so simple but I just don't have the knowledge to do it apprently. I found this but it doesn't work. I have divi theme if that ...
0
votes
0answers
8 views

Smush Featured image constraining in image file that is being loaded on page

I added Smush - what a mistake. Somewhere, it is changing which image is being loaded in the featured image spot, not by image compression but by loading the appending 1024x768.jpg string to the image ...
1
vote
0answers
35 views

Change WordPress image URLs via filter

I'm planning to create a wordpress plugin that will offload uploaded images to external website and show them from there. What I did so far: 1) Whenever a images gets uploaded, my custom functions ...
0
votes
1answer
18 views

how to post default thumbnail if post not created yet

I want to show a default thumbnail if a custom post not created yet. Here is my loop: <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?> <?php if ( ...
0
votes
1answer
17 views

add_theme_support post-thumbnails not working

I tried to add thumbnail support to my theme add_theme_support( 'post-thumbnails', array( 'post', 'page', 'service', '100', '90') );
0
votes
0answers
10 views

Need differrent images for Thumbnail and Feature

I need different images for thumbnail and featured image. Feature image will be shown only at the time of reading (on top of the post); Thumbnail will be shown everywhere except inside my content. ...
0
votes
1answer
59 views

Set featured image from auto generated video thumbnail url php

// Set video generated thumbnail as featured image*** if(isset($posted_data['video-file']) && $posted_data['video-file'] != ''){ //Wait 10 seconds for thumbnail to be generated ...
0
votes
1answer
22 views

Having trouble with customizing blog posts on the home page

I can't seem to get this right. I am trying to load in the 6 most recent blog posts (2 rows, 3 columns, responsive). The post title would appear on top of the thumbnail image. Here is the design ...
0
votes
0answers
23 views

Automatica crop image in wordpress 5.1?

original image size 777x518 when uploading this image it shows only 575x416 in WordPress 5.1. It automatically crops this image.I want, When uploading an image it will display your original size. How ...
0
votes
1answer
32 views

get_the_post_thumbnail_url('full') returns empty from custom post type

I'm trying to display the full size image of the single post from a custom post type that I created, below is what I've tried <?php $args = array( 'post_type' => 'press', 'order' ...
0
votes
0answers
22 views

Displaying product thumbnail category on hover in menu

I need a submenu like this one: https://www.groupelacasse.com/ (products submenu) Where there's an image and products category. When a category link is hovered, its category thumbnail is displayed ...
0
votes
0answers
16 views

Post Thumbnail: Is there a possibility to add a description to the meta box? [duplicate]

Probably many of you are using the Post Thumbnail feature: https://codex.wordpress.org/Post_Thumbnails I wonder if it is possible to add a description to the post thumbnail meta box in the admin area....
0
votes
0answers
11 views

Post thumbnail not working when previewing post

In my theme, thumbnails are working just fine for the most part. But when I preview a post by clicking the "Preview changes" button, about 3/4th of the thumbnails on the page are broken. When I test ...
0
votes
0answers
18 views

Blog featured images disappeared on my homepage

I am quite new to this but I edited and updated a website which has the blog area on the homepage. The website is a one page website and the blog area is also called 'News'. The blog was yet still ...
0
votes
1answer
32 views

How do I link a featured photo to it's post?

I cannot change the url of the photo in the featured-image edit section. The page can be found at https://irregularus.com/tips-and-stories/ and if you click on the picture you will see that it just ...
-1
votes
2answers
54 views

Display featured image metadata?

Display featured image file size, extension, filename, type, orientation? How to display some information of featured image in post. I need to display like this in post: Detail Of Easter Desktop ...
0
votes
2answers
19 views

How do I change the size of the feature picture of a single post?

Every time I select a featured photo for a single post, the size is always adjusted and it's massive. I have changed the size of the photo within WordPress, outside of WordPress, added code to ...
0
votes
0answers
73 views

Add second featured image to a custom post type without plugin

I want to show on hover a different featured image for some wordpress custom post type. I don't want to use a plugin, this because I want to learn how to use the wp API natively. Is there a way to ...
0
votes
2answers
23 views

Display Random Posts with thumbnail instead of just a title of the post

This code works really well. It displays the title of the post randomly with permalink but my objective is to display the thumbnail and/or featured image instead. Any help would be appreciated. <?...
0
votes
1answer
26 views

featured image metabox not moving custom post type

I am working on theme development and I have to move my featured image metabox so that it is more user friendly. I searched for move featured image metabox. Thanks Allah for I have found the ...
0
votes
0answers
18 views

Auto select a Featured Image based on post title + image title

Looked everywhere with no luck. How can I, using a function, assign a picture in my media library as a Featured Image for a post by matching their keywords? In other words: We post an article. We ...
1
vote
2answers
46 views

Change post featured image on hover

I've almost finished my first custom theme for a website. I've created some custom post type to manage a portfolio and a staff member section. No problem with the code, but the client asked if is it ...
0
votes
0answers
13 views

Plugin to play music and video by click on thumbnail

Is there any way to do something like this this I use the blow code but it does not work on my theme(jannah) /*-----------------------------------------------------------------------------------*/ # ...
0
votes
0answers
50 views

Force WordPress to strip/remove EXIF/IPTC metadata when resizing thumbnails

I am using Imagick with WP 5.0.3. Since version 4.5 WordPress use Imagick to create/resize thumbnails and it keeps EXIF/IPTC metadata (using GD, metadata are removed). WordPress keep EXIF/IPTC ...
0
votes
1answer
13 views

I cannot upload images to post or the media library in wordpress

Whenever I try to upload featured image for a new post or edit featured image of the older post, the following errors comes up: An error occurred in the upload. Please try again later. Here I have ...
0
votes
4answers
45 views

Add second background-image on hover

I'm using my featured image as a background image on a div and I would like to add a second background-image to that same div on hover (I need them both because I want to blend them). Any suggestions? ...
0
votes
1answer
19 views

post thumbnails error

i want to make a wp theme myself almost i do it but there is a biiiig problem and i cant solve it i had add add_theme_support to function and add the post thumbnail in my index but still cant give ...
0
votes
1answer
27 views

Display images of related posts

How do I display related post thumbnails? This is the code that I use: function related_posts_shortcode( $atts ) { extract(shortcode_atts(array( 'limit' => '3', ), $atts)); global $wpdb, $...
0
votes
0answers
48 views

use custom field value as featured image

I know this has been investigated before but no one has given a solution. Besides, I have not enough Stack-reputation to add comments, so I have to ask a new question. I want to use a post's custom-...
0
votes
0answers
10 views

Center crop the feature image

Could someone help me to perfectly center crop the thumbnails(feature image) as showing in the picture
0
votes
0answers
40 views

After migrating media library is not showing thumbnails

We are currently running a script to migrate from a custom CMS to WordPress. Everything is going perfectly well except for the "media manager". The media is all stored on a S3 bucket. Here is a ...
0
votes
0answers
17 views

Custom post thumbnail image not working anymore

This page shows thumbnails for custom posts, but it's not working with new posts: http://jmldesigndev.com/swss-02/about-us/meet-our-providers/ Here's the code that pulls the thumbnail, but I don't ...
1
vote
1answer
31 views

Add Featured image column into wordpress admin on pages AND posts

I have created a column in my functions.php file to add in a column to see the featured image on posts. However i would like to do this for pages as well, but if i repeat the code replacing posts with ...
0
votes
0answers
35 views

How to create a featured image for Wordpress-categories (without Plugin and ACF)

How to create a featured image for wordpress categories without plugin or ACF. Can someone help me? On the next step i want to show a list of categories (with the featured-image) on my homepage. ...
0
votes
1answer
6 views

Get thumbnails with array sizes parameter

I am trying to get both full and thumbnail images from post with wp_get_attachment_image_url: wp_get_attachment_image_url( get_the_ID(), array('thumbnail, full')); I know that by default size is ...
0
votes
0answers
16 views

Using the_post_thumbnail do not rollback to original image if specified thumbnail does not exist

We have a series of posts some do not have a defined thumbnail size (i.e. "small-featured"). Right now with the_post_thumbnail() if WordPress can not find that size it replaces it with the original ...
0
votes
2answers
22 views

Get author image from corresponding article in thumbnail

I want to add an author image for each thumbnail-preview on my homepage. I tried <?php echo get_avatar( get_the_author_meta( 'ID' ), 32 ); ?> but it gives me the same image in every thumbnail. ...
0
votes
0answers
21 views

Thumbnail on First post only on home page in Underscore theme

I am new to WordPress. I have customized underscore theme using latest bootstrap. I have an issue on the front page. On the first post I want to show the post thumbnail and the rest just show a link ...
0
votes
0answers
323 views

How to get featured image in Gutenberg from a transition_post_status hook?

Before the WordPress 5.0 update, I was able to get the featured image URL from a transition_post_status hook, for posts that are just published, from the WordPress post editor (but not from Gutenberg)....
0
votes
0answers
138 views

How do I get the featured image to sit below the header in the twenty nineteen theme?

In the twentynineteen theme, the featured image in a post becomes the background of the post. Actually, it becomes the background of the header. I'm trying to get it sit below the header in each post ...
0
votes
1answer
19 views

Unable to display the post thumbnail in the loop

I am trying to create a blog-listing page, that'll display the title and the featured images. Here's the loop that I am using page.php <div class="p-5 container" style="text-align:center;"> ...
0
votes
0answers
56 views

Add hide featured image option

Hello, I wold like to add a check-box or button to have a choice between hide or display featured image in single post. i'm in wordpress 5.0.2 This is the code of my simple single.php in the theme : ...
0
votes
0answers
16 views

programmatically add images to a post that I just added to the media library

I'm working on converting my old NucleusCMS blogs to WordPress. I have created a set of tables locally and began the conversion process. I've been fine right up to image conversion. NucleusCMS adds ...