Viewing 1 replies (of 1 total)
  • Not sure about any good tutorials, but you can do this by setting a $count variable before your loop, and adding to that incrementally to check for specific post numbers. Something like this:

    <?php $count = 0; ?>
    <?php if( have_posts() ) : while( have_posts() ) : the_post(); ++$count; ?>
    <div class="post">
        <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
        <?php if (($count == '1') && (!is_paged())): // If it's the first post on the first page. ?>
    
            <?php if ( has_post_thumbnail() ) the_post_thumbnail(); ?>
            <?php the_excerpt(); ?>
    
        <?php else: // If it's any other post on any other page. ?>
    
            <?php the_content(); ?>
    
        <?php endif; ?>
    </div>
    <?php endwhile; endif; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Adding auto post summary and thumbnail of first post’ is closed to new replies.