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

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

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 ask ...
0
votes
1answer
14 views

Integrate blog post image into user e-mail within contact form 7 plugin [closed]

I am using contact form 7 on blog posts for lead generation for properties. I want to integrate the blog post image in the contact form 7 HTML-e-Mail response so the user sees the image. Is there any ...
0
votes
0answers
21 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
19 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
4 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.
0
votes
1answer
20 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
24 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
20 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
19 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
13 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
14 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
30 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
11 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 ...
0
votes
0answers
82 views

Custom image size not displaying with wp_get_attachment_image()

I created a custom image size for my portfolio thumbnails add_image_size( 'gallery-thumb', 240, 180, true ); I created a shortcode to display all images using a lightbox with lazy loading to ...
0
votes
0answers
60 views

Automatically adding pdf thumbnail as featured image

I have managed to get new posts created using a public gravity form that uploads a pdf and a jpg. I have PDF thumbnails generated when uploaded to the media library and I have code that will select ...
0
votes
1answer
34 views

Can set_post_thumbnail be used to remove a thumbnail?

I have a way to set a thumbnail for a post if a checkbox is selected or not. The problem I'm having is if the checkbox is selected and then unselected, how do you delete the featured image that was ...
0
votes
0answers
10 views

Display Multiple Photos as Featured Image when mouse moves on to it post

I need to add some photos (3 or 4 photos) to the post thumbnail (featured image) and should be displayed image 1, 2, 3 & 4 when mouse moves on to the post thumbnail...How can I do that. Please ...
0
votes
0answers
26 views

Can I use 'Featured Image' as a hero image and a thumbnail?

I am finding a lot of great information for using the_post_thumbnail() to use this feature as a post hero OR a thumbnail, but I'm struggling to figure out how to use the 'Featured image' as both in my ...
1
vote
1answer
59 views

How to display a default image for post thumbnail using functions.php?

I want to display a default featured image if there hasn't been one set. I googled for a solution and all I could find was this piece of code (below). My question is, is there a way of displaying a ...
0
votes
0answers
7 views

Thumbnails not displaying on web page

I have been struggling with correcting this error for a while now, I have no idea as to what is causing it. The posts thumbnails are not displaying on the page, however the pictures in the posts are ...
1
vote
0answers
9 views

How to make Feature Image required for a Particular Template

For a particular post, I use a specific template (Story template) to display it. And any post with this particular template should have Featured Image. I am using this snippet code to check if the ...
0
votes
1answer
76 views

Featured image error after importing blog posts

I exported blog posts to an xml file from a WordPress website and then imported them to another. I moved over all the images in their correct folders via FTP and then used a plugin to register them in ...
0
votes
1answer
38 views

How to deal with wordpress images?

I have blog post featured image that has specific size. then I want to display it with its excerpt in different page called front-page.php, but I want to display it with larger size. It already appear ...
0
votes
1answer
15 views

Search results thumbnails different size

Seems that according to the nature of my theme, whenever I do a search query and a result from my Projects section appears, the pictures appear huge and even break the footer! Whereas if I do a search ...
0
votes
0answers
13 views

Resizing images only for WooCommerce categories

I'm trying to resize images just for category pages for a WooCommerce site I'm building. Essentially, I want image square throughout the site, but 3:4 for WooCommerce categories. I thought this code ...
0
votes
1answer
32 views

How to use default image as featured image by implement some code in function.php

I want to use a default image as a featured image for all those Posts and Pages, where is not any selected featured image from media. I have tried this code in function.php but not working, function ...
0
votes
1answer
80 views

Is it possible to set Featured Image using HTML?

The Amazon affiliate program does not let you download images from their site and upload it via their server. One authorized way of using images from Amazon is to use their API or Sitestripe. For new ...
0
votes
1answer
35 views

Category images are not displaying in WordPress

I have categories list with there respective images. I am able to get the category name and description but I am not getting the category image. I tried the below code. <ul> <?php ...
0
votes
0answers
28 views

Have get_the_post_thumbnail output different image if custom meta exists

I have a meta box on each post where a user is able to select another image from the media library. I want this image to override the output whenever get_the_post_thumbnail is used across the whole ...
0
votes
1answer
227 views

How to force Wordpress to upscale images?

I have a bit of a problem with my Wordpress images. I want to force Wordpress to upscale images, so that the preferred add_image_size is always available. I'm adding the sizes as follows: //Theme ...
0
votes
1answer
25 views

Can't locate custom image sizes defined by child theme

I'm developing a child theme (mms-child) based on a simple parent (mms – also my dev). I am quite used to the usual way of defining custom image sizes within functions.php as follows: ...
0
votes
1answer
19 views

Why doesn't WordPress use the smaller sized image?

I've been trying to understand how WordPress picks images to use depending on the size of the user screen, but I've been unable to figure it out. Is it just by checking if the request is coming from a ...
0
votes
1answer
23 views

show thumbnail for subcategory wordpress

$args = array('parent' => 17); $categories = get_categories( $args ); foreach($categories as $category) { echo '<p>Category: <a href="' . get_category_link( $category->term_id ...
0
votes
0answers
23 views

the_post_thumbnail doesn't resize properly

I am using the_post_thumbnail and when I do the image will not resize properly. It retains the height so it just squeezes down until the media query kicks in. When I just load the image via my cdn ...
0
votes
1answer
26 views

Is it possible to get_the_post_thumbnail (Featured Image) inside a sprintf function?

I am trying to add the featured image of posts to my mega menu. I want to display the featured image inside a div tag. How would i add the featured image inside of a sprintf function? $thumbnail = ''; ...
1
vote
1answer
145 views

How to change post featured image using a custom field of category?

I have added an image custom field for categories, in which I assign an image for every category. Something like this: I have a custom post type, and for each post I publish in this post type, I ...
0
votes
1answer
24 views

Show a default image

Hello how can I do with this function if there is no post thumbnail loaded, show a default image echo get_the_post_thumbnail( $page->ID, 'image' );
0
votes
1answer
26 views

How to change the format of thumbnails into wordpress theme?

dear community. I have question about changing the format of thumbnail into WordPress theme. I want to change all generated images format into a theme to *.webp. I already have generated *.webp images....
0
votes
1answer
15 views

What sense makes medium_large_size_h => 0?

WP Version 5.4.2 There is an image size definition of medium_large with size_w = 768 and size_h = 0 - You can find it near line 530 of wp-admin/includes/schema.php: // 4.4.0 'medium_large_size_w' ...
0
votes
0answers
26 views

Wordpress Multisite: Images moved to /sites/1?

I noticed that my older images are no longer getting resolved by Wordpress 5.3.4. - the file doesn't exist on that path and 404 gets returned. For images that were originally uploaded to https://www....
1
vote
1answer
68 views

Add instructions to featured image

How do you add instructions to the featured image field (see attached screenshot) - something like: "recommended dimensions - H980px by W450px"..?
0
votes
1answer
31 views

Need clear explanation about medias/files/attchments

During an import, I need to add images and linked to a custom post using WPML like : post 1 in french 1.1 picture foo.jpg (visible in library and attached to this post and add as featured image ) 1.2 ...

1
2 3 4 5
31