wasmo-theme/archive.php

53 lines
1.2 KiB
PHP
Raw Permalink Normal View History

<?php
/**
* The template for displaying archive pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Nineteen
* @since Twenty Nineteen 1.0
*/
get_header();
?>
<section id="primary" class="content-area">
<main id="main" class="site-main blog-main archive">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
?>
2024-01-25 16:15:24 +00:00
<?php if ( get_query_var('paged') ) {
echo '<span class="paged-page-number">(Page '. get_query_var('paged') .')</span>';
} ?>
</header><!-- .page-header -->
<?php
// Start the Loop.
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content/content', 'loop' );
// End the loop.
endwhile;
// Previous/next page navigation.
echo wasmo_pagination();
// If no content, include the "No posts found" template.
else :
get_template_part( 'template-parts/content/content', 'none' );
endif;
?>
</main><!-- #main -->
</section><!-- #primary -->
<?php
get_footer();