Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <?php get_template_part( 'template-parts/masthead' ); ?>
- <div id="content">
- <?php
- $recent_posts = wp_get_recent_posts( array( 'numberposts' => 1 ) );
- ?>
- <?php if ( $paged < 2 ) : ?>
- <?php
- the_archive_description( '<div class="article-description">', '</div>' );
- ?>
- <div class="container">
- <div class="row">
- <main class="col-sm-12 col-md-10 offset-md-1 articles">
- <?php if ( have_posts() ) : ?>
- <header class="article-header">
- <?php
- the_archive_title( '<h1 class="article-title"><span>', '</span></h1>' );
- ?>
- </header>
- <?php
- while ( have_posts() ) :
- if( $recent_posts[0]->ID == get_the_ID() ) continue;
- the_post();
- get_template_part( 'template-parts/content', get_post_type() );
- endwhile;
- else :
- get_template_part( 'template-parts/content', 'none' );
- endif;
- ?>
- <?php get_template_part( 'template-parts/post-nav' ); ?>
- </main>
- </div>
- </div>
- <?php else : ?>
- <div class="container">
- <div class="row">
- <main class="col-sm-12 col-md-10 offset-md-1 articles">
- <?php if ( have_posts() ) : ?>
- <header class="article-header">
- <?php
- the_archive_title( '<h1 class="article-title"><span>', '</span></h1>' );
- ?>
- </header>
- <?php
- while ( have_posts() ) :
- the_post();
- get_template_part( 'template-parts/content', get_post_type() );
- endwhile;
- else :
- get_template_part( 'template-parts/content', 'none' );
- endif;
- ?>
- <?php get_template_part( 'template-parts/post-nav' ); ?>
- </main>
- </div>
- </div>
- <?php endif; ?>
- </div>
- <?php
- get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement