mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-16 16:43:42 +03:00

* 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
47 lines
838 B
PHP
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();
|