How to get title and featured image to show up
-
Hello, I have a nice structure going with my page.php. I have a title and the featured image displaying how I want. However, when I go to reading -> make post page the page I want, the title and featured image disappear.
The next logical step is that it changes that page to index.php right? I go and put the stuff from page.php I want ( featured image and title html and css ) and it’s still not showing up.
Am I missing something?
index.php
<?php get_header('main'); ?> <main role="main"> <div class="page-section clear"> <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[0]; ?>')"> <?php endif; ?> </div> </div> <!-- section --> <section> <h1><?php _e( 'Latest Posts', 'html5blank' ); ?></h1> <?php get_template_part('loop'); ?> <?php get_template_part('pagination'); ?> </section> <!-- /section --> </main> <?php get_sidebar(); ?> <?php get_footer(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to get title and featured image to show up’ is closed to new replies.