Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.