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
- How can I make the hero image full width, while keeping the contents below it contained, without the scroll bar appearing when viewing it?
- When should you use WP_Query vs query_posts() vs get_posts()?
- When to use WP_query(), query_posts() and pre_get_posts
- Missing feature image link function
- WP_Query by just the id?
- Meta_query compare operator explanation
- WP_Query with “post_title LIKE ‘something%'”?
- wp query to get child pages of current page
- How to get an array of post data from wp_query result?
- How to get post id of static front page?
- meta_query with meta values as serialize arrays
- How to only display posts whose meta_value field is not empty?
- Get post ids from WP_Query?
- Pagination when using wp_query?
- Exclude post ID from wp_query
- How to print the excuted sql right after its execution
- How to extend WP_Query to include custom table in query?
- How to store and receive variables in WP sessions?
- Filter to remove image dimension attributes?
- How to get image title/alt attribute?
- User-friendly cropping of post thumbnails?
- Should I use Pre Get Posts or WP_Query
- How can i retrieve default post per page value? from settings->reading. And total number of posts?
- Nested meta_query with multiple relation keys
- Is it necessary to use wp_reset_query() in a WP_Query call?
- Can I force WP_Query to return no results?
- Can wp_query return posts meta in a single request?
- Using pre_get_posts with WP_Query
- Find out total number of pages in global query on archive page?
- WP_Query + random
- Resetting post data to previous loop in nested loops
- order by numeric value for meta value
- numberposts? showposts? posts_per_page?
- $GLOBALS[‘wp_the_query’] vs global $wp_query
- Broken? WP_Query and “attachment” as a post type
- Some doubts about how the main query and the custom query works in this custom theme?
- Order by multiple meta key and meta value [closed]
- Post_count only shows the number of results per page
- How can I make add_image_size() crop from the top?
- Page template query with WP_Query
- No Thumbnails Generated
- How to disable WordPress from creating thumbnails?
- meta_query ‘compare’ => ‘IN’ not working
- add_image_size() for specific Post Types
- Stop wordpress from hardcoding img width and height attributes
- Programmatically get images by URL and save in uploads folder
- How do you get the post thumbnail size?
- Wp get all the sub pages of the parent using wp query
- What is appropriate flow for custom data from URL in WP_Query?
- set_post_thumbnail_size vs add_image_size