Skip to content

Instantly share code, notes, and snippets.

@rmorse
Created February 2, 2016 12:23
Show Gist options
  • Select an option

  • Save rmorse/f4c824817ef7d0de4f98 to your computer and use it in GitHub Desktop.

Select an option

Save rmorse/f4c824817ef7d0de4f98 to your computer and use it in GitHub Desktop.
Basic Archive Template Test
<?php get_header(); ?>
<section id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<?php
while ( have_posts() ) : the_post();
echo '<p>';
the_title();
echo '</p>';
// End the loop.
endwhile;
// Previous/next page navigation.
the_posts_pagination( array(
'prev_text' => __( 'Previous page', 'search-filter' ),
'next_text' => __( 'Next page', 'search-filter' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'search-filter' ) . ' </span>',
) );
// If no content, include the "No posts found" template.
else :
_e("No results found.");
endif;
?>
</main><!-- .site-main -->
</section><!-- .content-area -->
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment