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

Show categories when upload a featured image

When you upload an image in the media library, you can add categories in the process. Is it possible to show categories when you are editing a post and add a feature image. In this case, when you ...
0
votes
0answers
17 views

Hi, Rare Featured Image Error

I have a problem with a website in WordPress. When I create a new post and try to upload the featured image the following happens: The featured image is uploaded to the server, and appears in the ...
0
votes
0answers
12 views

Default Featured Image only shows on single post page

so I would like to set a default Post featured image / thumbnail. I tried using this code in the post loop in the loop.index, but that only showed the default image in the single post pages and not on ...
0
votes
1answer
14 views

How to Add Different Default Featured Image for different Custom Post Types? [closed]

I've 3 different post types and want to set the default featured image for each post type. Thank you in advance.
0
votes
0answers
23 views

How to add an AJAX Link to the “Featured Image” meta box in Gutenberg? [closed]

I am new to React and Gutenberg. So, I don't have an idea how to do this: I've installed the YoImages Plugin in WP, which inserts a link into the Featured Image Box. A click on the link opens a ...
0
votes
1answer
22 views

default post thumbnail and category if there is no thumbnail and category

I want to do following... 1 - Publish the new post, 2 - Check if this new post has a featured image, 3 - If it has not a featured image, define its category and save the specific prepared image as the ...
0
votes
1answer
21 views

get_the_post_thumbnail_url does not return anything if image size is set

I want to display the post-thumbnail image in the header using get_the_post_thumbnail_url() with defined size, however if I am using it without specifying the size, like get_the_post_thumbnail_url() ...
0
votes
1answer
27 views

<?php the_post_thumbnail_url('medium'); ?> not outputting medium size image URL

I am currently trying to output post thumbnail URL with its different image sizes; to use in ssrcset. My current code is: <img class="productimage lazyload" data-src="<?php ...
0
votes
1answer
23 views

Get Feature Image Url [closed]

I am doing wordpress plugin development for firebase notification and i fork a repo from github, link here : https://github.com/Clintal/wp-firebase-push-notification Now i want add here also some ...
0
votes
0answers
6 views

How to set the featured image / page thumbnail from php template?

I added a template php to my Wordpress site, showing a basketball image from url, I'd like this to be the thumbnail of my website when sharing on social media My php template- <?php /* *...
0
votes
1answer
44 views

How to add a default predefined thumbnail when creating a brand new post?

I'm making a plugin that has a custom post type and I need to add predefined content. I used filters default_title and default_content for the title and content but I can't find how I can add an ...
0
votes
0answers
24 views

Change featured image lightbox image size to full size

So i made a blog with posts with image galleries, and i would like to make the featured image lightbox full size instead of the smaller size it is now. I already did this with the images in the ...
0
votes
0answers
12 views

Display Author avatar as featured image

Does anyone know how I can display the post author avatar as the default featured image for posts? Thank you
0
votes
0answers
9 views

How would I center the featured image position on a post?

The featured image us left aligned and not centered, and on mobile view does not look good. How can I customize the way the featured image banner looks?
1
vote
0answers
20 views

Duplicated featured image is not showing

I have a site where I upload Apkmod file that's why I have to upload dozens of post daily but some time by mistake I upload the same post with the same feature image and I don't want my site work ...
0
votes
2answers
98 views

PHP variable = get_the_post_thumbnail_url outputting without slashes

In a custom shortcode function, I'm grabbing the featured image URL: $text_slider_testimonial_img = get_the_post_thumbnail_url($single->ID); If I echo $text_slider_testimonial_img immediately I ...
0
votes
1answer
19 views

Blog replace single post page featured image

i made a blog and now i want to fix the issue if somebody doesn't add an image to use as the thumbnail, I want to use a default image. I did find a plugin that fixes that, but i would like to change ...
1
vote
0answers
18 views

Using featured image from another page

I have the following code which, if a page is a sub-page of 'Portfolio' (ID 12), will use the featured image of the Portfolio page rather than it's own. However, I also have a page of 'Services' with ...
0
votes
1answer
14 views

wp_get_attachment_url not fetching URL?

the below code does not seem to return an image url at all, chrome inspector says source is unknown foreach ($subcategories as $subcategory) { $link = get_term_link( $subcategory->...
0
votes
0answers
8 views

How to change the featured image / post thumbnail size on category / archive pages?

I am trying to figure out how I can change the size of the featured images on category and archive pages on my WordPress website using a custom theme. In my functions.php file, I have added the ...
0
votes
0answers
12 views

Resize thumbnail in elementor hello theme

Absolute beginner, need help trying to resize my thumbnails in elementor hello theme. Elementor say its a theme issue, yet its their theme ! I have tried css custom codes to no avail.
0
votes
1answer
18 views

Removing extra large generated images disables all crops

function filter_image_sizes( $sizes) { unset( $sizes['1536x1536']); // disable 2x medium-large size unset( $sizes['2048x2048']); // disable 2x large size return $sizes; } add_filter('...
0
votes
0answers
14 views

Generate thumbnails with HTML overlay with PHP

I want to generate sosial media image with an HTML overlay. So in simple terms JPEG thumbnail + HTML overlay = JPEG output. Example, I have an light image without text on it, then I add an dark ...
1
vote
0answers
24 views

Media Gallery Upload photo incorrect way like glitch

I start having this issue like 3 days ago, I disable all plugins but nothing works. See the examples: Original photo: after I upload:
0
votes
0answers
14 views

Thumbnail (featured image) and Media Library cleanup queries help needed

I inherited a website that was started 13 years ago, over the years the version of WP and themes have been kept current, however much of the older content (and there is a ton of it) was created long ...
0
votes
0answers
13 views

How to make product image inherit from category image

I'm planning on importing large amount of products and automatically assign them to certain product categories(in woocommerce). I have 5 different categories and want for each product in each of those ...
0
votes
1answer
13 views

How is called this thumbnail slider feature

I am new to wordpress, and I am trying to create new website. I found really nice-looking theme, but when I installed and activated it, it looks very simple compared to the preview page. Is it due to ...
0
votes
0answers
20 views

Get ACF Sub-Category image from loop

I'm using ACF to assign a category image to sub categories. Parent category-(contributors) > Sub categories-(contributor name). All my posts have multiple category and sub categories selected but I'...
0
votes
0answers
15 views

Adding an optional page title with background image to custom page templates (or all pages for that matter)?

I will explain what I’m trying to accomplish as I am having a difficult time figuring out the best way to ask this question. I have a custom theme that I am working on. I have several custom page ...
0
votes
0answers
16 views

Change featured image when changing viewport

I have a featured image linked to my page. In my page template, I have: <?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?> I want that the featured image changes when I ...
0
votes
0answers
23 views

Make 1st Slide of PowerPoint file to be the Post thumbnail preview image

I'm building a website for a client.. The website will only accept PowerPoint files to be uploaded in our server by our future members and soon we will start accepting online links.. I would like to ...
0
votes
0answers
25 views

Issues with wordpress watermark

I'm adding a watermark to a WordPress featured image of a post submitted by me by clicking on a button on the front end which is visible only to the person who submitted that post. That button calls a ...
0
votes
0answers
8 views

How to show gallery in image attachment page?

And how to show all images from article/post at the bottom of this image page (plus NEXT, PREV button)?How to show gallery in image attachment page? Demo here
0
votes
0answers
59 views

Use WEBM file as post thumbnail or “Featured Image”

I have run into an issue that I've been trying to solve for a few days now. I have some .webm video files for web stored away from my WordPress installation. Previously, I was using the Post Type->...
0
votes
0answers
6 views

How to Add call button on a featured image in a wpsite? check the slap king image, there are two buttons on the featured image

I want to add 2 buttons on the featured image of my WordPress pages. Kindly help me out.
1
vote
1answer
29 views

How to stop twenty fifteen theme from cropping featured images?

The twenty fifteen theme always crops featured images, it cuts from both lower and upper part of the image usually. How to prevent it? How to show the normal (full) dimensions of featured images? In ...
0
votes
1answer
28 views

Replace background image with post thumbnail in shortcode

So, I'm trying to pull the featured image of posts in via a shortcode. But I want to replace the inline style of setting it as a background image and have it returned as an img tag instead. <?php /...
0
votes
2answers
32 views

Resize post thumbnail

I'm trying to ensure that all assets are the same size, no matter what resolution they are uploaded in. I'm stuck finding outdated info on the matter, I think. I've gotten to the following snippet if( ...
0
votes
0answers
14 views

Remove Post Title from Thumbnail on homepage and archive

I am trying to show only thumbnail images and not title on Homepage and Archive pages. Attempted Removing Title Tag from Thumbnails but not working for me. Any help will be an obligation!
0
votes
0answers
24 views

broken image in WordPress thumbnail

My Thumbnail are like this image and my thumbnail are broken. Please help me. Here one of my thumbnail.
0
votes
0answers
14 views

How to delete all images from post with selected status?

Need to delete images: thumbs, meta_key = _thumbnail_id attached images. For example meta_key = 'image_upload_9860026864', I don't know what the digits at the end. Inside a:3:{i:0;s:6:"126306&...
1
vote
0answers
16 views

Error get the value for ALT is we check to see if an actual ALT value is set, if not we use the caption and if no caption is set we use the title

function custom_pic_alt( $attachment_ID ) { // Get ALT $thumb_alt = get_post_meta( $attachment_ID, '_wp_attachment_image_alt', true ); // No ALT supplied get attachment info if ( empty( $thumb_alt ...
0
votes
0answers
5 views

How to show custum fields of the media library with linked featured image in blog archive pages?

I have added some custom fields to the items in the media library to save copyright details with the images. Usually I can include this fields in the templates of child themes, but this seems to be ...
1
vote
0answers
14 views

Is it possible to use Data URI image to set a post thumbnail?

I have a custom template I am setting up on a site that generates an image in canvas to go along with the post in Data URI format, and allows me to save it as jpg/png. However, would like these images ...
0
votes
0answers
5 views

How to use html or content block (a countdown timer) for a featured image for a specific post

I have the timer in a content block. Is there a way to add the content block as the featured image? Or just the html somehow? There is a thread on similiar situation in Aug answered by Nate Allen-...
0
votes
0answers
16 views

I want to Host Wordpress thumbnails as base64

how to base64 encode images in wordpress template I followed the tutorial from this and pasted the code in functions.php file Now i am getting problem in temtplate level I want to imageEncode() the ...
0
votes
1answer
55 views

How to use <picture></picture> tag in featured image

In my WordPress site 5.5.1 version so, we uploading jpeg images so we want to page speed for upload webp images. Webp images are not supported by a few browsers. so how to switch images format like ...
0
votes
0answers
12 views

Control image size of get_post_thumbnail_id()

I am working with WooCommerce product image. My code is like below if ( ! function_exists( 'woocommerce_template_loop_product_thumbnail' ) ): function woocommerce_template_loop_product_thumbnail() ...
0
votes
0answers
9 views

WooCommerce replace product edit screen thumbnail

I am currently using external image sources for my products on WooCommerce. So i would like to replace the default thumbnail / image across the site. I have managed to do this everywhere with the ...
0
votes
0answers
24 views

Blank featured image in media library only with variable url, but work nicely with static image url

I create plugin who create my posts from content files. My featured images are a list of urls. In CASE n ° 1, I test with a static url, the image is well imported and present in the media library (as ...

1
2 3 4 5
32