2019-09-25 00:37:41 +03:00
|
|
|
<?php
|
|
|
|
|
2019-10-22 20:57:04 +03:00
|
|
|
namespace WordPressDotOrg\FiveForTheFuture\Theme;
|
2019-09-25 00:37:41 +03:00
|
|
|
|
2019-10-01 20:44:45 +03:00
|
|
|
// If we don't have any posts to display for the archive, then send a 404 status. See #meta4151.
|
2019-09-25 00:37:41 +03:00
|
|
|
if ( ! have_posts() ) {
|
|
|
|
status_header( 404 );
|
|
|
|
nocache_headers();
|
|
|
|
}
|
|
|
|
|
|
|
|
get_header(); ?>
|
|
|
|
|
2019-10-08 00:11:35 +03:00
|
|
|
<main id="main" class="site-main" role="main">
|
2019-09-25 00:37:41 +03:00
|
|
|
|
2019-10-08 00:11:35 +03:00
|
|
|
<?php if ( have_posts() ) : ?>
|
2019-09-25 00:37:41 +03:00
|
|
|
|
2019-10-08 00:11:35 +03:00
|
|
|
<header class="page-header">
|
2019-09-25 00:37:41 +03:00
|
|
|
<?php
|
2019-10-08 00:11:35 +03:00
|
|
|
the_archive_title( '<h1 class="page-title">', '</h1>' );
|
|
|
|
the_archive_description( '<div class="taxonomy-description">', '</div>' );
|
|
|
|
?>
|
|
|
|
</header><!-- .page-header -->
|
|
|
|
|
|
|
|
<?php
|
2019-09-25 00:37:41 +03:00
|
|
|
|
2019-10-08 00:11:35 +03:00
|
|
|
while ( have_posts() ) :
|
|
|
|
the_post();
|
2019-09-25 00:37:41 +03:00
|
|
|
|
2019-10-25 23:34:46 +03:00
|
|
|
get_template_part( 'template-parts/content', get_post_type() );
|
2019-09-25 00:37:41 +03:00
|
|
|
|
2019-10-08 00:11:35 +03:00
|
|
|
endwhile;
|
2019-09-25 00:37:41 +03:00
|
|
|
|
2019-10-08 00:11:35 +03:00
|
|
|
the_posts_pagination();
|
2019-09-25 00:37:41 +03:00
|
|
|
|
2019-10-25 23:34:46 +03:00
|
|
|
?>
|
|
|
|
|
|
|
|
<?php else :
|
2019-09-25 00:37:41 +03:00
|
|
|
|
2019-10-08 00:11:35 +03:00
|
|
|
get_template_part( 'template-parts/content', 'none' );
|
2019-09-25 00:37:41 +03:00
|
|
|
|
2019-10-25 23:34:46 +03:00
|
|
|
endif; ?>
|
2019-09-25 00:37:41 +03:00
|
|
|
|
2019-10-08 00:11:35 +03:00
|
|
|
</main><!-- #main -->
|
2019-09-25 00:37:41 +03:00
|
|
|
|
|
|
|
<?php
|
|
|
|
get_footer();
|