Retrieving featured image on static blog posts page

In your example, $posts_page contains the ID of the page for posts, you can use that with any API function that accepts a post ID. For the featured image: $posts_page = get_option( ‘page_for_posts’ ); $post_thumbnail_id = get_post_thumbnail_id( $posts_page ); $url = wp_get_attachment_image_src( $post_thumbnail_id, ‘your-custom-size’ ); echo $url; And outputting post title with filters applied: $posts_page … Read more

Query posts only without featured image

Try this code , its working for me value=>’?’ because(value was required for NOT EXISTS comparisons to work correctly prior to 3.9. You had to supply some string for the value parameter. An empty string or NULL will NOT work. However, any other string will do the trick and will NOT show up in your … Read more

Get Featured Image Outside Loop Not Working

First you have to make sure the current post ID + 1 and Current post ID – 1 is exactly the post ID of the next and previous posts. if it is correct then you can use <img src=”https://wordpress.stackexchange.com/questions/244237/<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id($prevID),”full’); echo $image[0];?>” /> and <img src=”https://wordpress.stackexchange.com/questions/244237/<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id($nextID),”full’); echo $image[0];?>” … Read more