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

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 ...
0
votes
0answers
8 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
14 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
27 views

How can I do a video for featured image in woocommerce

I was wondering if any of ya'll ninja wordpressers know how to do a video like for featured media of woocommerce similar to the following link: https://www.overnightmountings.com/engagement-rings/halo/...
0
votes
1answer
31 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
14 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
10 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
17 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
20 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
30 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
26 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
54 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
18 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
17 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
18 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
22 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
21 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
68 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
22 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
19 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
13 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
19 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
38 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
27 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 ...
0
votes
0answers
6 views

How to automatically resize featured image?

I'd like to automatically resize the feature image so that large ones will be displayed fitted in the screen? I really have no idea how to begin.
0
votes
1answer
16 views

How to calculate the sum of all featured thumbnail height on Wordpress?

In an archive page, I need to calculate the total height of a which is the container of many featured thumbnails, knowing that all the featured thumbnails have different heights (but the same width) ...
0
votes
2answers
24 views

How to echo images Urls from a wordpress post, that are relally in the post

I have a question. I use the following code to output the image URLs of a wordpress post. The image URLs are related to the "attached images" of a wordpress post and not the ones that are ...
0
votes
0answers
10 views

Images not displaying on an e-commerce website

what can be done when a wordpress website does not display images except when clicked on? The image placeholders display grey and not the images. Thanks.
0
votes
1answer
52 views

Child Theme not overwriting Parent theme php file

I'm new to Wordpress and how Child themes work. My child theme I am trying to overwrite two files in sub-directories. I've copied the parent files and edited them in child theme but changes are not ...
1
vote
3answers
26 views

WP Post-Thumbnail

I've already saw the question some times here, but sadly nothing helped me out yet. Right now I've got following code: <h2 class="title_bar">Videos</h2> <ul class="vlist&...
0
votes
0answers
7 views

Post Thumbnail Uploaded pragmatically and attached with post but not showing on Front-end or Post Edit Page

I am trying to do something like this. For multiple file upload, I want to create a post for each image and attach that image with the post. Everything is working. As you can see in the picture image ...
0
votes
0answers
9 views

how to modify the subtitles in the WordPress gallery (h4)

When I create an image gallery in a wordpress entry and put their titles on them, they appear in H3 Any way to change them to be on h4? example of a gallery image created in WordPress : <figure ...
0
votes
0answers
11 views

Creating a “completed” or “inprogress” banner across projects featured image

I am trying to create a custom banner that appears on the featured image of the of a project based on a status they input. Does anyone have any good tutorials or easy plugins that this can be done> ...
0
votes
1answer
20 views

Conditional post thumbnail based on logged status and post tag

I'd like to show different post thumbnails in archive.php and category.php like this: user logged out & post has tag "private" -> shows a "default-private" image user logged in & post has tag ...
1
vote
2answers
114 views

Force documents to appear in Featured Image dialogue

Having a perplexing issue... ...for a custom post-type called 'Resources' I used the 'Featured Image' or 'thumbnail' function within WordPress to allow users to attach documents to 'Resources'. The ...
0
votes
0answers
37 views

Wordpress Responsive Image ( srcset ) not work properly

I have a very strange problem There are images with the correct size on the host and image sizes are properly recorded in WordPress But I get the following html code output <img width="300" ...
0
votes
0answers
9 views

ACF Gallery field - Auto load all posts featured images

Is there a way to load all featured images from one post type from one post category into an ACF Gallery field which updates the load query for example on each field request or other auto triggers? ...
0
votes
0answers
8 views

How to add one image as featured image on all posts in WP?

I am looking for a way to add one image from the media gallery as a featured image on all posts that will be published on my Wordpress. Is there any plugin that does this job? Or any other way?
0
votes
0answers
14 views

How do you change the thumbnail size on WP link embed in the Block Editor?

When I use the WordPress Embed block in the Block Editor, the preview image pulls the thumbnail (150px) and stretches it, rather than grabbing the featured image and sizing it down. How can I change ...
0
votes
0answers
36 views

Is there any way to set the Featured image in wordpress post editor, using a Getty images embed code

I want to be able to use a Getty images embed code to set the featured image (Post thumbnail) in my wordpress post editor. Is there any way of doing this? I understand that Wordpress doesn't allow ...
0
votes
0answers
10 views

What is the difference between Homepage thumbnails image and Featured Image

My site theme, Schema has a different homepage thumbnails image and featured images but which one the google will be crawling, because google recognize the image size of at least 1200 wide. my site ...
0
votes
0answers
19 views

Image size doesnt change via wp_get_attachment_image_src

Edit: I want to show thumbnail with custom size.So, I mean scale the thumbnails to avoid load heavy size to browser.I couldnt do it. Here is my code in my plugin: <img class="img-responsive img-...
0
votes
2answers
24 views

Adding guiding text to the 'Featured Image'-box in the backend

How do I add some guiding text under the 'Featured Image'. Right here: I have experienced several times now that people don't get where and what this is. So it could be nice to be able to add a ...
1
vote
0answers
30 views

Set Featured Image by URL Form Post

How do I append a form URL to set as my featured image? I am working on a user frontend submission site that is pretty basic and using WP User Frontend Plugin. I finally figured out the GIF URL ...
0
votes
0answers
16 views

Extract width and height values from add_image_size in Timber

I have set the following custom image size in my functions.php file: add_image_size( 'search-image', 320, 250, true );. In my search.twig file, I am using <img src="{{ story.thumbnail.src('search-...
0
votes
0answers
36 views

Generate and upload screenshot as featured image for user-submitted post

I have a website where users can submit posts (the posts must have a URL of a website). I would like to use a screenshot of that URL to be the featured image. I have used this code to generate the ...
-1
votes
1answer
95 views

Change image on post title hover (more than one instance) - Jquery

I created a loop of posts from terms having a block for each term like the following: - Term title Featured image of one post from that term List of all posts for that term - Right now I'm using ...
1
vote
0answers
12 views

Set size for attachments

I am working on a custom theme and have generated content with FakerPress to include some uploaded post images. I want to ensure any image uploaded as an attachment in a post displays in one of the ...
0
votes
1answer
70 views

Use AJAX to fetch Current Post Thumbnail for Wordpress when Uploaded throughMedia Uploader Frontend

i Use WordPress Media Uploader on Frontend to allow users to upload Thumbnail for there UGC site. I also show a Preview of the Image on Frontend. When a user clicks the button the Media Uploader opens ...
0
votes
1answer
43 views

How to Display Image Caption but Not Alt Text

I'm trying to display images with their caption, but when I do it displays both the caption and that alt text. I've tried to use unset( $fields['image_alt'] ); to hide the alt text, but it does ...

1
2 3 4 5
31