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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

How to get rid of a blank space where the featured image used to be?

I want my featured image, or post thumbnail, for the post to be displayed on the "posts" or "home" page (they are the same on my site), but not on the actual post. This is easy ...
Car's user avatar
  • 1
0 votes
1 answer
25 views

Getting the wrong featured image on archive page

I assigned my posts archive to a site on settings -> reading. I added a post thumbnail to this site, and i want to show the image with a shortcode i have written in my plugin. The problem is, that ...
LovinQuaQua's user avatar
1 vote
1 answer
47 views

How to get a page's featured image through REST API?

The featured image of a post/page is not included when using REST API. Not only that, getting it is not particularly simple. This seemingly irrational fact apart, I tried to implement this answer but ...
drake035's user avatar
  • 1,167
0 votes
1 answer
31 views

Changable favicon based on post-featured image

its possible use to change the favicon on based the post-featured image icon? I use 100x100 size or 64x64 icon images on my posts. I want these icons to show as a favicon also. if some posts not have ...
SS Apps's user avatar
1 vote
1 answer
25 views

WP "optimizing" PNGs into thumbnails 5X larger than originals - FIX

As I am about to add over 50,000 product photos to a site in development, I am more than concerned about the thumbnails being generated and “optimized” by WordPress. Between WordPress, Woocommerce, ...
Swapot's user avatar
  • 11
1 vote
1 answer
56 views

How do I add text or message above the featured image area in gutenberg for a CPT

I'm hoping to add text above the featured image box in the gutenberg editor to let people know what size of image to upload. I've pieced together how to do this for all posts, but I don't know enough ...
rudtek's user avatar
  • 6,121
0 votes
1 answer
21 views

Second featured image only shows in metabox preview after saving a post in the wordpress editor

I am trying to add a second featured image to the Wordpress post editor, and it seems all be working. When I select and image from the mediauploader the first time the image shows in the preview of ...
Brango's user avatar
  • 1
1 vote
1 answer
28 views

Get featured image thumbnail and inserting into custom field on wordpress posts

I'm not a developer so trying to put this together has not been successful. Hope someone can assist! My goal - create a custom field on a wordpress post when a post is published or updated which ...
StevieK's user avatar
  • 11
0 votes
1 answer
34 views

How to add year and month path to old attachment images?

I was using only uploads folder for attachment images. After a while, I started using also Year and Month folder. But I did realize something today. And that is, new uploads works perfectly but old ...
Aslan's user avatar
  • 13
0 votes
0 answers
36 views

How can I scan my entire site for every image to know each image's size and dimensions and url?

A client wants to know the size and dimensions of every image on their wordpress site and where they are located (URL). I'm a jr developer tasked with this and I truly have no idea where to start. I ...
MJC's user avatar
  • 1
3 votes
1 answer
249 views

How do I display a PDF thumbnail as a link to the PDF without uploading the image

When I found a couple of years ago that WordPress will create thumbnails of uploaded PDFs, I was so happy, thinking I wouldn't have to make and upload separate PDF cover images to have a thumbnail ...
bkepl's user avatar
  • 131
0 votes
1 answer
33 views

Featured image on page is not displayed with certain theme: how to debug this?

If using certain theme, featured images on the content type "page" aren't displayed. Content type "posts" displays featured images with this theme. And other themes display ...
Evgeniy's user avatar
  • 101
0 votes
0 answers
29 views

Unable to get the correct URL using get_the_post_thumbnail_url() in wp-admin

I've added some custom fields to a rest route. I want to retrive the post thumbnail for my CPT and I'm using this code: This is the code I'm using to add the post meta to the CPT after an image is ...
ICTDEV's user avatar
  • 123
1 vote
1 answer
56 views

Featured Video replacing Featured Image

I am trying to create a list of an "animation" post category, where each of these posts has a video associated with it. I want the video to be accessible inside the post itself, of course, ...
The Feadow's user avatar
0 votes
0 answers
13 views

How to upload multiple images to use as gallery in Kirki Framework

I am using Kirki Option framework which works like charm in most cases, I recently shifted from Redux framework. I have a section in my website for the gallery, I want to upload multiple images using ...
Milan Bastola's user avatar
0 votes
0 answers
240 views

Site Logo is overriding my post featured image on Social Media

Using my site logo is necessary for my website header/header image to propagate properly on all formats. Unfortunately, when active, it overrides any featured image for a new post whenever the post is ...
1st  Goal Web Solutions's user avatar
0 votes
0 answers
30 views

Set Featured Image Automatic From Webp Format

I am trying to set the featured image (webp) from post content to automatically set as featured with the following code in functions.php Auto add featured image function ...
user102195's user avatar
0 votes
1 answer
102 views

Restricting Image Upload Sizes using 'wp_handle_upload_prefilter' - Stuck media progress bar when Featured Image?

I have grabbed this function and adjusted it to my needs. add_filter( 'wp_handle_upload_prefilter', 'check_image_dimensions_during_upload' ); function check_image_dimensions_during_upload( $file ){ ...
dekkyd's user avatar
  • 5
0 votes
0 answers
14 views

What to input into table header to import featured images with CSV or XML file?

I'm using the Really Simple CSV Importer plugin and what to import featured images in bulk for my content items. I've tried multiple combinations like: post_image post-thumnail What could I put into ...
Bruno  Vincent's user avatar
0 votes
1 answer
505 views

Get the featured image of an ACF relationship field

I have an Advanced Custom Fields field group with ID group_61318c077c7d6. I've made this field group visible for Block = 'slider'. In that field group is a field with ID field_61318c078a746, a ...
Steve's user avatar
  • 1,707
0 votes
0 answers
374 views

Adding multiple featured images on custom post type with Avada Theme

I have a custom posttype called "mitglied". I use ACF Pro to add the featured image on the single mitglied custom posttype with _thumbnail_id. I use the Avada Theme, and Avada supports ...
LovinQuaQua's user avatar
1 vote
0 answers
37 views

Extend file format support for post thumbnails

I am trying to enable video thumbnails for posts in my theme. I created a custom post thumbnail media uploader in an editor plugin as follows (This is necessary, because the default uploader can't ...
TimMKuehle's user avatar
0 votes
1 answer
30 views

Hot to change resized image link on posts

I have 5000+ posts therefore could you help me to change url link addresses of images on posts as below? I want to change the urls of resized images to their original url. Before: asd.net/wp-content/...
Korhan's user avatar
  • 1
0 votes
0 answers
21 views

I want to resize post featured image without cropping image. How?

I want show post featured image on different page in different size but image in not showing full. Also, do not want to crop image. I am adding an link that what type of work I want do. Example When ...
First Guide's user avatar
0 votes
0 answers
56 views

Display only posts with thumbnails

I'm trying to have a WP theme display only posts that have a thumbnail. Below is the code of the file that shows some posts on the frontpage. I've already tried to change the code (please see the //...
Johnny Bravo's user avatar
1 vote
1 answer
169 views

wp media regenerate says "no regeneration needed" whe that's no the case

I'm trying to generate thumbnails for a PDF attachment. Right now in the uploads/ folder there is only the PDF file, no image thumbnails related to it. But when I run the regeneration with : wp media ...
mike23's user avatar
  • 5,991
0 votes
1 answer
71 views

Images thumbnail not cropping square

I'm trying to create a related post file with squares images. In the functions.php I've added the following code: function my_theme_setup() { add_theme_support('post-thumbnails'); // Add ...
Mari's user avatar
  • 11
0 votes
2 answers
346 views

website images getting corrupt automatically

I have just migrated my website from hostinger to hostinger manually. And now when I upload any picture on my website the photos getting corrupted automatically. Although the picture was shown on my ...
GULSHAN's user avatar
1 vote
0 answers
43 views

Why not attaching images after impoting using wp cli

I want to move posts from one site to another, because of the big amount of posts I am trying with wp-cli import. The destination site also has huge amounts of posts, now when I am importing XML files....
Mi2's user avatar
  • 11
1 vote
1 answer
276 views

medium_large image size not displaying properly on the frontend?

I have added a code snippet to utilize the "medium_large" thumbnail size. This works fine on the back end and I can select this image size in all image blocks. It also seems to output the ...
GregF's user avatar
  • 11
0 votes
1 answer
244 views

set_post_thumbnail or media_sideload_image adds image multiple times in media library

I am trying to add the featured image to posts and that works, however, the featured image is apparently set everytime I check my post. <?php $post_id = get_queried_object_id(); $bla = "...
Johan's user avatar
  • 309
0 votes
1 answer
210 views

How to I remove Featured Image from the Posts/Category Lists?

It seems like this should be easy, but I do not see an option to exclude the featured image from the category index pages, or posts index pages (whatever they are called). Here is an example of the ...
jligda's user avatar
  • 3
1 vote
1 answer
2k views

How do I work with responsive images in Wordpress? (img srcset/sizes)

I'm trying to make a Wordpress theme and I'm very confused about how I should use responsive images. Here's how I'm currently displaying each thumbnail in my post list: <? the_post_thumbnail() ?>...
Hubro's user avatar
  • 141
0 votes
0 answers
43 views

get_post_thumbnail_id() not getting correct featured image after post edited

Hy, everything works fine until I change featured image by editing post, using wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),"full") I get the url to the original picture, ...
Josip Bogdan's user avatar
0 votes
2 answers
151 views

Import alt text in set_post_thumbnail

I am using set_post_thumbnail in order to programmatically attach an image to my posts. I was wondering how to set a different alt text for this image, for every post, meaning that the same image ...
NBgr's user avatar
  • 11
0 votes
1 answer
8 views

Why some images are not allowed to be edited only for thumbnails?

please see this: As you can see, on the right columns I don't have the classic 'apply to' radios, where you can choose to apply modifications only to thumbnails. It happens only with certain images, ...
Luca Reghellin's user avatar
0 votes
2 answers
33 views

Regarding to the performances, should I check if a post has a thumbnail before or after checking if is the front page (or single page, etc.)?

Regarding to the performances, and the performances only (and not from the point of view of the readability of the code), is it a best practice to check if the post has a thumbnail before to check if ...
PhpDoe's user avatar
  • 197
0 votes
1 answer
64 views

the_ID & wp_get_attachment_image_src(the_ID(), "medium") blank

Using: $my_query->the_post(); $thumbnail_arr = wp_get_attachment_image_src(the_ID(), "medium"); $thumbnail = $thumbnail_arr[0]; $thumbnail is outputting a blank value. If I echo the_ID() ...
Steve's user avatar
  • 1,707
0 votes
1 answer
506 views

In my wordpress admin panel Suddenly The Category, tag and featured Image Option are not showing

In my wordpress admin panel Suddenly The Category, tag and featured Image Option are not showing. I write blogs in my wordpress blogs but suddenly there are missing three options for adding The ...
Md. Sabbir Al Mamon's user avatar
0 votes
1 answer
147 views

image_size with respect to aspect ratios

I have image assets that I load externally and insert programmatically. There are 3 different asset classes: landscape, portrait, and 1:1 The default image_sizes are creating a lot of clutter that's ...
Fluxian's user avatar
  • 130
0 votes
1 answer
1k views

Remove default Image Sizes

I'm trying to remove the default image sizes that are created given a specific image size threshold. Listed using this: get_intermediate_image_sizes() // thumbnail [1] => medium [2] => ...
Fluxian's user avatar
  • 130
0 votes
0 answers
31 views

Strange image artifact on font-page thumbnail image

There is a recent post published on the front page of our website, midstory.org, titled "Toledo’s Jazz Scene Is Roaring Once Again". When viewed on a 1008p screen, there is a thin colored ...
Jason O's user avatar
0 votes
0 answers
16 views

How home my code doesn't display any feature image? Looping through post from a taxonomy and not getting feature images back

The only thing I am trying to do is just to display each post from Services that belongs to the taxonomy called 'national' and display its title and its featured image. So far it displays each title ...
fjimenez's user avatar
0 votes
1 answer
191 views

How do you add a featured image to a page (not post)?

There's no "add featured image" in the settings section in a page I created. On the other hand, a similar blogpost I created has this setting. I went over some websites which told me that I ...
Rakshith's user avatar
0 votes
1 answer
25 views

if custom field doesn't exist, use post thumbnail instead, as image background

I am trying to modify a code in my theme, but I only partially succeed. I need a working condition, if a custom field is not present, to use the post thumbnail instead, as the background image. if the ...
vyperlook's user avatar
  • 177
0 votes
1 answer
295 views

WP Still Generating 150x150 Thumbnail Size Even After Un-Setting Small Size in Functions.php

I am using following code to prevent WordPress from creating some un required image sizes for my theme and only upload the original size add_filter( 'intermediate_image_sizes_advanced', '...
Suffii's user avatar
  • 201
0 votes
0 answers
50 views

How do I remove lazyloading on the mh-spotlight-widget

What is the easiest way to disable native lazy load without a plugin for a specific widget in WordPress? I can't find anything at all about this question that I could use for functions.php? // XX = ...
Aprilia Parrino's user avatar
0 votes
1 answer
225 views

custom image size not being displayed in loop

I believe I'm missing something on media images. I have created a custom image size with this code: add_image_size( '250-square', 250, 250, true); // cropped I have then uploaded images. When I ...
rudtek's user avatar
  • 6,121
0 votes
1 answer
150 views

add_image_size function not working

In functions.php i have, function university_features() { add_theme_support('title-tag'); add_theme_support('post-thumbnails'); add_image_size('professorLandscape', 400, 260, true); add_image_size('...
Patrick2997's user avatar
0 votes
1 answer
513 views

Bulk-add featured images in posts with no featured image

I have a site with loads of posts (news items). Some posts don't have featured images yet. Adding the images to those posts (few hundreds) is a tedious task. We basically want to add 1 and the same ...
Rick's user avatar
  • 111

1
2 3 4 5
33