Move layout-related code to separate component files

This commit is contained in:
Kelly Dwan 2019-10-07 17:11:35 -04:00
parent 3ebc219416
commit b08effbe8b
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
5 changed files with 55 additions and 41 deletions

View file

@ -10,43 +10,41 @@ if ( ! have_posts() ) {
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
</header><!-- .page-header -->
<?php if ( have_posts() ) : ?>
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
</header><!-- .page-header -->
while ( have_posts() ) :
the_post();
<?php
/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content', 'page' );
while ( have_posts() ) :
the_post();
endwhile;
/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content', 'page' );
the_posts_pagination();
endwhile;
else :
the_posts_pagination();
get_template_part( 'template-parts/content', 'none' );
else :
endif;
?>
get_template_part( 'template-parts/content', 'none' );
</main><!-- #main -->
</div><!-- #primary -->
endif;
?>
</main><!-- #main -->
<?php
get_footer();