• On the landing page, I would like the featured image to display below the post title, date, poster, and comment indicator. The default is to put the featured image on top of the title. Once you click on the post, it displays any image below the title. I would like this for the landing page too.

    Within “content-page.php”, I tried moving featured_image_display below entry-header as shown below, but that didn’t work. Any suggestions?

    <header class="entry-header">
    		<span class="screen-reader-text"><?php the_title();?></span>
    		<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
                    <?php nisarg_featured_image_disaplay(); ?>
    • This topic was modified 7 years, 5 months ago by trustychords.
    • This topic was modified 7 years, 5 months ago by trustychords.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter trustychords

    (@trustychords)

    I figured out how to do this. In “content-excerpt.php” you have to have move <?php nisarg_featured_image_disaplay(); ?> below the header tag. I pasted the complete code below.

    <?php
    /**
     * Template part for displaying posts.
     *
     * @package Nisarg
     */
    
    ?>
    
    <article id="post-<?php the_ID(); ?>"  <?php post_class( 'post-content' ); ?>>
    
    	<?php
    	if ( is_sticky() && is_home() && ! is_paged() ) {
    		printf( '<span class="sticky-post">%s</span>', __( 'Featured', 'nisarg' ) );
    	} ?>
    
    	<header class="entry-header">
    
    		<span class="screen-reader-text"><?php the_title();?></span>
    
    		<?php if ( is_single() ) : ?>
    			<h1 class="entry-title"><?php the_title(); ?></h1>
    		<?php else : ?>
    			<h2 class="entry-title">
    				<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
    			</h2>
    		<?php endif; // is_single() ?>
    
    		<?php if ( 'post' == get_post_type() ) : ?>
    		<div class="entry-meta">
    			<h5 class="entry-date"><?php nisarg_posted_on(); ?></h5>
    		</div><!-- .entry-meta -->
    		<?php endif; ?>
    	</header><!-- .entry-header -->
    	
    	<?php nisarg_featured_image_disaplay(); ?>
    
    	<div class="entry-summary">
    		<?php the_excerpt(); ?>
    	</div><!-- .entry-summary -->
    
    	<footer class="entry-footer">
    		<?php nisarg_entry_footer(); ?>
    	</footer><!-- .entry-footer -->
    </article><!-- #post-## -->

    good job solving your own problem – seems that’s the new normal for this theme

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Move Featured Image Below Post Title on Landing Page’ is closed to new replies.