Created
July 7, 2016 16:05
-
-
Save stevenspads/8b45af86565cbbe8158641f902a14ffa to your computer and use it in GitHub Desktop.
WordPress basic Archive page loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( have_posts() ) : ?> | |
<header class="page-header"> | |
<?php | |
the_archive_title( '<h1 class="page-title">', '</h1>' ); | |
the_archive_description( '<div class="archive-description">', '</div>' ); | |
?> | |
</header> | |
<?php | |
while ( have_posts() ) : the_post(); | |
get_template_part( 'includes/content/content', get_post_format() ); | |
endwhile; | |
else : | |
get_template_part( 'includes/content/content', '404' ); | |
endif; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment