lisamiltonbayer
5/15/2017 - 2:18 PM

WordPress - Exclude Latest Page

WordPress - Exclude Latest Page

// Latest Post
<?php query_posts('showposts=1'); ?>

// Next two newest posts
<?php query_posts('showposts=2&offset=1'); ?>
<!-- Latest Post -->
        <div class="row latest-post">
                <?php query_posts('showposts=1'); ?>
                <?php
                        if ( have_posts() ) :
                        while ( have_posts() ) :
                        the_post();
                ?>
                <div class="col-md-6 news">
                    <?php echo get_the_post_thumbnail(); ?>
                    <h3><?php the_title(); ?></h3>
                    <?php the_excerpt(__('(more…)')); ?>
                </div>
                <?php
                endwhile;
                endif;
                ?>

        <!-- 2nd / 3rd Posts -->
        <div class="col-md-6 news older-posts">
                <?php query_posts('showposts=2&offset=1'); ?>
                <?php
                        if ( have_posts() ) :
                        while ( have_posts() ) :
                        the_post();
                ?>
                
                <div class="row mb-lg">
                    <div class="col-md-4">
                        <?php echo get_the_post_thumbnail(); ?>
                    </div>
                    <div class="col-md-8">
                        <h3><?php the_title(); ?></h3>
                        <?php the_excerpt(__('(more…)')); ?>
                    </div>
                </div>
                <?php
                endwhile;
                endif;
                ?>
                </div>
        </div>