[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * The template for displaying archive pages 4 * 5 * Used to display archive-type pages if nothing more specific matches a query. 6 * For example, puts together date-based pages if no date.php file exists. 7 * 8 * If you'd like to further customize these archive views, you may create a 9 * new template file for each one. For example, tag.php (Tag archives), 10 * category.php (Category archives), author.php (Author archives), etc. 11 * 12 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ 13 * 14 * @package WordPress 15 * @subpackage Twenty_Sixteen 16 * @since Twenty Sixteen 1.0 17 */ 18 19 get_header(); ?> 20 21 <div id="primary" class="content-area"> 22 <main id="main" class="site-main"> 23 24 <?php if ( have_posts() ) : ?> 25 26 <header class="page-header"> 27 <?php 28 the_archive_title( '<h1 class="page-title">', '</h1>' ); 29 the_archive_description( '<div class="taxonomy-description">', '</div>' ); 30 ?> 31 </header><!-- .page-header --> 32 33 <?php 34 // Start the loop. 35 while ( have_posts() ) : 36 the_post(); 37 38 /* 39 * Include the Post-Format-specific template for the content. 40 * If you want to override this in a child theme, then include a file 41 * called content-___.php (where ___ is the Post Format name) and that 42 * will be used instead. 43 */ 44 get_template_part( 'template-parts/content', get_post_format() ); 45 46 // End the loop. 47 endwhile; 48 49 // Previous/next page navigation. 50 the_posts_pagination( 51 array( 52 'prev_text' => __( 'Previous page', 'twentysixteen' ), 53 'next_text' => __( 'Next page', 'twentysixteen' ), 54 /* translators: Hidden accessibility text. */ 55 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>', 56 ) 57 ); 58 59 // If no content, include the "No posts found" template. 60 else : 61 get_template_part( 'template-parts/content', 'none' ); 62 63 endif; 64 ?> 65 66 </main><!-- .site-main --> 67 </div><!-- .content-area --> 68 69 <?php get_sidebar(); ?> 70 <?php get_footer(); ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated : Sat Dec 21 08:20:01 2024 | Cross-referenced by PHPXref |