get_the_post_thumbnail()
expects the post ID as first parameter. So you need a post object like … $home_post[1]
.
echo get_the_post_thumbnail( $home_post[1]->ID );
… should do what you need.
Related Posts:
- How to change image type for specific size?
- What’s the proper way to find and remove duplicate images from posts and the media library?
- Mixed content warnings after changing site adress from HTTP to HTTPS
- add_image_size() zoom-crop
- Insert an image into a post by API
- Which are precisely the predefined image sizes?
- Creating a rotating header /image slider using theme customization
- Use Media Library to manage galleries like Nextgen (with folders, albums, collections, tags, categories, terms…)
- No srcset for hard-cropped thumbnails
- Adjust image caption within visal editor
- Change Image URL to a CDN
- Slider image issue in wordpress
- Responsive Images – Add srcset attributes to custom Images Function
- Getting custom size image URL
- Retrieving images from a NextGEN gallery
- Query for recent images across multiple posts
- Loss of sharpness in jpg imported as header in twentyeleven
- How do I remove generated HTML around images in posts?
- Animated Gif image not uploading correctly
- A way to change image urls in post to cdn image url?
- Get author custom image field URL to display on post page?
- Can an image have more than one parent_post?
- Keep image EXIF info after compressing original image?
- Set Post Image Using Shortcode
- Print specific image size in galley loop
- How can I attach hotlinked images in posts/pages within the same server?
- WordPress Image Attachment using remote image
- Image URLs stopped working due to Permalinks?
- How can I create more upload paths, like a post corresponding to a post title folder used to store images of the same product
- Every admin only can see his uploaded images im editor
- Update an image block style programatically
- How can I add a “data-pin-nopin” the featured image html?
- Hardcoded Images Too Big
- Resize into square the single product image in woocommerce without cropping [closed]
- an error occurred in the upload. please try again later (Maybe File Permission Issue)
- Image Upload HTTP 500 Internal server error
- Animated GIF on WordPress posts? [closed]
- Generate images to be associated for tag and category?
- Different background images on different sites [closed]
- I have no images in an activated wp theme
- How to know what size image to use for background? [closed]
- Understanding WordPress image sizes and responsive images
- Image large size [closed]
- Media gallery images url instead of ID on WP API Response
- Google Page Speed Insights – Optimize Images
- Partial img lazy load with WP 5.5
- Why doesn’t WordPress use the smaller sized image?
- css to fit image by HEIGHT
- Alt Image WordPress [closed]
- Some Images Disappeared from Media Library?
- What is required in the hosting environment for WordPress to process an image into multiple sizes?
- Get an image from url, resize it, and save on a custom folder (not the media library)
- Get all custom sizes in srcset attribute
- Why isn’t add_image_size(‘event-secondary-image-thumbnail’, 250, 150) working?
- Moving an image to the side [closed]
- How to add thumbnails to posts and pages automatically in a uniformed fixed elegant way?
- How do I implement an image viewer and rotator? [closed]
- Upload images – Theme options
- Is it possible to modify default image name suffix?
- How to replace post image url before posting using api?
- image upload/edit is broken: “Image data does not exist. Please re-upload the image.”
- Background Image Does Not Display on Page
- Can’t fix corrupted images
- How can we upload common images only to AWS S3 using WordPress?
- Deleted Image giving a 301
- Avatar picture is broken
- WordPress append -1 to the image name
- wpdb function for filtering the images by title
- Link to products with the same image title (woocommerce)
- WordPress Single Post image gallery as slider
- WordPress does not load most theme images
- There is an image embedded on my page that I can’t locate in order to delete. Please help me!
- Could creation of various image sizes cause slow form submission response?
- How to add featured image use HTML
- Correct color profile and saving? Thumbnail creation?
- Allow users to upload attachments to certain posts
- WordPress and Advanced Custom Fields and Flickity
- How to get image ID based on get_theme_mod image URL?
- How to bulk update then save images in wordpress posts
- stop wordpress from resizing feature gif images
- Change wordpress default upload path to another domain
- Modify media file markup output
- Responsive images in Bootstrap 4 slider
- Theme page headers and rotator images not assigned after website migration
- WPML – Change media uploader language
- How can I add an “Attach image to this post/page” link on the Add Media lightbox?
- WordPress Is Saving Original Image Only
- Display images from JS?
- Create a custom attachment thumbnail for quick page load
- Change the image for a certain URL
- How to make an image bigger with wp_get_image_editor
- Assign one featured image to multiple posts?
- An image on my site is showing as the wrong image [closed]
- Set padding for all content except images and few more elements
- Post migration – images do not display
- wp_handle_upload Image sizes
- Display Images from Array with wp_get_attachment_image() [closed]
- Orientation of featured image in post?
- Uncaught Error: Call to undefined function file_is_valid_image()
- Remove one srcset entry from wp_get_attachment_image