five-for-the-future/themes/wporg-5ftf/archive.php
Kelly Dwan 553247cbf7
Pledge List: Display pledges in list with sort and search ability (#33)
* Use the post-type when choosing template partial
* Add pledge archive templates
* Style pledge list page
* Style individual pledge
* Use pledge featured image for the logo
* Fix aspect ratio of image
* Add real contributors to the pledges
* Enable sorting and searching of pledges
* Add pledge sorting markup
* Style the page header
* Restrict any pledges with no contributors from being shown on the frontend
* Update contributor count key name
2019-10-25 16:34:46 -04:00

47 lines
838 B
PHP

<?php
namespace WordPressDotOrg\FiveForTheFuture\Theme;
// If we don't have any posts to display for the archive, then send a 404 status. See #meta4151.
if ( ! have_posts() ) {
status_header( 404 );
nocache_headers();
}
get_header(); ?>
<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
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', get_post_type() );
endwhile;
the_posts_pagination();
?>
<?php else :
get_template_part( 'template-parts/content', 'none' );
endif; ?>
</main><!-- #main -->
<?php
get_footer();