mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-17 15:45:44 +03:00
Add pledge archive templates
This commit is contained in:
parent
3847e83cf3
commit
b210abe340
3 changed files with 125 additions and 0 deletions
46
themes/wporg-5ftf/archive-5ftf_pledge.php
Normal file
46
themes/wporg-5ftf/archive-5ftf_pledge.php
Normal file
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
namespace WordPressdotorg\Five_for_the_Future\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();
|
Loading…
Add table
Add a link
Reference in a new issue