You use the function get_the_post_thumbnail()
which returns a string
. So you need to print that string with echo
or use the_post_thumbnail()
which echos itself.
Related Posts:
- Trying to use “Medium” featured image for custom post type on home page
- wp_get_attachment_image not to get the post_thumbnaill
- Query posts only with featured image
- Count the number of images uploded on the website
- How to paginate attachments in a secondary query as gallery?
- How do I exclude all images from a wp_query?
- Get attachment by slug
- get images attached to post
- In loop: posts have thumbnail AND other variables
- How to display images in related posts?
- Trying to check and see if a post has a featured image outside of the main loop
- query attachments of parent page if attachments of current page are smaller than …
- Query sticky posts with thumbnails
- Retrieve featured image (thumbnail) url from multiple posts with one query
- wp_query for displaying attachments with a tag
- Get image of latest post from taxonomies/categories
- WP Query search for attachments and their exact title
- Multiple instances of Featured Image Query
- post thumbnail not showing up with shortcode
- How WordPress attaches its Featured Images with posts?
- getting post thumbnail within loop causes an error
- WP_Query condition affects posts_per_page count
- Site not getting correct featured image from my query
- Retrieve posts using thumbnail id as meta key
- WP Query – Post Thumbnail
- Redirect to another page using contact form 7? [closed]
- Better wordpress attachment query than this
- How can I check for a thumbnail in WordPress?
- how would i change post->ID to work correctly when querying pages?
- How to display the featured image for each post?
- Query posts only without featured image
- How to add WordPress featured image via SQL
- Display all attached image of every post of custom post type and link to original post
- the_post_thumbnail do 2 queries. How to optimize
- Insert images into wordpress post with a query
- Find only those galleries with images
- WP_Query: attachment image in “full” size?
- Featured images loop for Orbit Slider
- how to put thumbnail below category’s title?
- WP_Query how to add a thumbnail to the first post from the last 5 posts?
- Change database image location for transportability
- WP query retrieve the src of attached image
- Featured Image as Background with Offset
- How To Query All Attachment Images Found In Post Galleries
- Display images with same specific value?
- Featured image not showing on page
- Some images not being returned with wp_get_attachment_image
- Display First posts without the default featured image
- Pull Instagram images into an existing loop?
- Display only posts with thumbnails
- Wp get all the sub pages of the parent using wp query
- What is appropriate flow for custom data from URL in WP_Query?
- How to merge two queries together
- Is it possible to query all posts that don’t have an attachment?
- WP_Query to show post from a category OR custom field
- Get posts by meta data OR title
- Pagination causes error 404 when used with front-page.php
- How to pass custom parameter to WP_Query for filtering in pre_get_posts
- Add custom search results to main WP search [duplicate]
- Sanitizing search data for use with WP_Query
- How to search by a post and a category name on wordpress at the same time?
- What’s the point of the query_vars filter?
- How can I get an array of all IDs from the current queried object?
- Get Category Archive Template Name Dynamically
- Query post from all category with same tag on 1 pages
- How to correctly pass values to wpdb->prepare()?
- WP_Query, pre_get_posts and offset
- How do I Add images uploaded in the post to a default custom field
- Filtering posts from different categories into different section by doing WP_Query only once
- Suggestions on making this query/code more performant
- Where to put meta Keys
- Multiple Orderby’s using random order WP_Query
- using pre_get_posts for search results not found
- How can I override one post and make it display content for another post?
- Image with large file size not cropping
- Exclude parent with child pages from WP_Query
- Co-authors list of all posts
- get_posts always returning the same number of posts = 5
- Hide Featured Image box – isn’t working?
- How to use ‘WP_Query’ or ‘query_posts’ to display content in a descending order
- How to display specific ids of posts using wp_query?
- Tax_Query using WP_Query not working
- Magazine style frontpage with multiple categories/loops and no duplicate posts
- orderby ignored by wp_query
- $wp_query->found_posts not returning correct value
- Custom Taxonomy Archive Page to display either ALL listings or only from URL
- Any way to use FETCH_KEY_PAIR with $wpdb?
- attachment_fields_to_save first parameter is null
- Filter admin ajax data by url query
- Using a variable within the blog posts array query – posts_per_page as variable
- I cannot upload images to post or the media library in wordpress
- Single query for multiple categories
- Add another feature image box
- Best way to query posts and order by relevancy to query
- Woocommerce WP_Query post__not_in problem
- custom query – offset to pagination
- Order Custom Field by Price
- Stop link being removed in menu/list when viewing that post
- Pagination in custom loop [duplicate]
- wp query problem