Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
339 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
37 views

Featured images duplicating and replacing next image

Took over a project, and one of the errors is the featured images (and certain others rendered in a similar way) are duplicating themselves and replacing the next image thumbnail. <a href="&...
Ranson Namba's user avatar
0 votes
1 answer
37 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 ...
Dylan Flannery's user avatar
1 vote
3 answers
7k views

Gutenberg editor get post featured image by id

How can I show a post featured image by post id in gutenberg editor? I have a slider with latest posts and when I iterate through over posts I would like to show the post featured image as well. Here ...
fefe's user avatar
  • 894
2 votes
1 answer
9k views

Find posts without featured image? [duplicate]

I need way to find post(s) without featured image set. I use WP as gallery site and for every post I set featured image. I wish to check if there is any post(s) without featured image. Any code to ...
Advanced SEO's user avatar
2 votes
2 answers
9k views

How to get relative URL of medium sized featured image?

How to show featured image (medium sized) relative URL (relative to the website root)? I need something like this: uploads/214/07/image-600x400.png I tried with this: if ( has_post_thumbnail()) { ...
Advanced SEO's user avatar
-2 votes
1 answer
3k views

Orientation of featured image in post?

Is it possible to show orientation of featured image in post on single.php? For example: Orientation of featured image is: portrait / landscape. I have found that this could be done by calculating ...
Advanced SEO's user avatar
-2 votes
1 answer
1k views

How to show file size of featured image? [duplicate]

How to show file size of featured image in post on single.php? For example: File size of featured image is: xx kb/Mb I need size of featured "full" rezolution, also file size of "medium" resolution ...
Advanced SEO's user avatar
-3 votes
1 answer
3k views

How to show file type of featured image?

How to show file type of featured image in post on single.php? For example: Featured image type is: ".jpg" I can get mime-type, like "image/jpeg". It could be also some check of image mime-type ...
Advanced SEO's user avatar
1 vote
2 answers
2k views

How to check if there is image title, caption, description?

I use this code to display featured image title, caption (excerpt), description (content): echo get_post(get_post_thumbnail_id())->post_title; echo get_post(get_post_thumbnail_id())->...
Advanced SEO's user avatar
3 votes
1 answer
7k views

Get the size (size in Kb or MB) of an featured image?

I need to display some featured image info on post page. Among other info I need to display file size of image (featured image of post). I tried this function inside single.php. <?php function ...
Advanced SEO's user avatar
1 vote
0 answers
158 views

Setup Featured image on all posts from thesis thesis_post_image custom field?

I moved from thesis to other wp theme and i want to change the thesis post images (these are saved under thesis_post_image in database )as featured images. Site have over 1000+ posts. Is there a way ...
Gowtham's user avatar
  • 11
0 votes
1 answer
354 views

Title image is missing ( but is not the WP 3.5 issue )

I use Wp 3.4.2 and Featured Image. After I feel the Title, Alternate Text and publish the post, html code looks like this: <img width="214" height="300" title="" alt="Test" class="frame wp-post-...
Blanka's user avatar
  • 35
2 votes
2 answers
2k views

How to set the width and height rule for featured image

I want to know how to make rules to re-size the images for featured image? I am uploading an image in featured image section but it is not cropping the images in exact width and height for all the ...
user159377's user avatar
1 vote
1 answer
633 views

Big Image on Featured Post, Normal on Single Post

I have included a code which fetches any post under my category=featured. And that shows-up on the top of my content (*whenever we have any breaking news to show*)on blog-page. The problem is, The ...
vajrasar's user avatar
  • 169
1 vote
1 answer
145 views

How to use photo in multiple posts?

I have a theme that shows images only from gallery tab (so i can't re-use an image to other posts). As you know an image can only get attached to 1 post. I found a plugin that you can attach an image ...
beachlizard's user avatar