In 'Reading Settings' I have chosen the static-page drop-down menu of a page I created to be the post page.
I've put the html, php, and css from my page.php in index.php to style it. I'm unable to get the featured image. The php I use to get it on page.php isn't working. It's not rendering any html. Also
<?php the_title(); ?> is pulling up the title of the most recent blog post, not the page title of the page I have switched over.
This is how I"m generating the featured image on page.php
<div class="single-image-anchor"> <?php if (has_post_thumbnail( $post->ID ) ): ?> <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?> <div class="single-image" style="background-image: url('<?php echo $image; ?>')"> <?php endif; ?> </div>
I am fairly new to Wordpress so thanks in advance.