Move featured image below post title – Nano
-
Hello all,
I have already Googled around to find out how to move the featured image of a post to display below the title, but all the answers I found were specific to certain themes and aren’t working for me.
I am using the Nano theme and have created a child already. But I can’t figure out which code to switch around. I tried a few things and it didn’t work, would really appreciate any guidance.
This is what my content.php file looks like. According to the other threads I’ve seen I should be able to move the title section above the thumbnail section, but my php knowledge is not good enough to know exactly which sections go together.
<?php /** * @package Nano */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <?php if ( has_post_thumbnail( $post->ID ) ) { ?> <div class="entry-thumbnail"> <?php if ( has_post_thumbnail( $post->ID ) ) { ?> <?php if ( is_single() ) { ?> <?php $attachment_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ); $image_url = ( $attachment_url ) ? $attachment_url[0] : ''; ?> <a href="<?php echo $image_url; ?>" class="wrapper-overlay prettyphoto" title="<?php __( 'Large View', 'nano' ); ?>" rel="bookmark"><?php the_post_thumbnail( 'full' ); ?><span class="img-overlay"></span><span class="icon icon-zoom-in"></span></a> <?php } else { ?> <a href="<?php the_permalink(); ?>" class="wrapper-overlay" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'nano' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_post_thumbnail( 'full' ); ?><span class="img-overlay"> </span><span class="icon icon-external-link"></span></a> <?php } ?> <?php } ?> </div> <?php } ?> <h1 class="entry-title"> <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> </h1> <?php if ( 'post' == get_post_type() ) { nano_post_top_info(); } ?> </header><!-- .entry-header --> <div class="entry-content"> <?php if ( is_single() ) { the_content(); wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'nano' ), 'after' => '</div>', ) ); } else { the_content(); } ?> </div><!-- .entry-content --> <footer class="entry-meta group"> <?php nano_meta(); ?> </footer><!-- .entry-meta --> </article><!-- #post-## -->
Any help would be really appreciated.
- The topic ‘Move featured image below post title – Nano’ is closed to new replies.