[ Index ] |
PHP Cross Reference of WordPress |
[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 specific one. For example, Twenty Thirteen 10 * already has tag.php for Tag archives, category.php for Category archives, 11 * and author.php for Author archives. 12 * 13 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ 14 * 15 * @package WordPress 16 * @subpackage Twenty_Thirteen 17 * @since Twenty Thirteen 1.0 18 */ 19 20 get_header(); ?> 21 22 <div id="primary" class="content-area"> 23 <div id="content" class="site-content" role="main"> 24 25 <?php if ( have_posts() ) : ?> 26 <header class="archive-header"> 27 <h1 class="archive-title"> 28 <?php 29 if ( is_day() ) { 30 /* translators: %s: Date. */ 31 printf( __( 'Daily Archives: %s', 'twentythirteen' ), get_the_date() ); 32 } elseif ( is_month() ) { 33 /* translators: %s: Date. */ 34 printf( __( 'Monthly Archives: %s', 'twentythirteen' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentythirteen' ) ) ); 35 } elseif ( is_year() ) { 36 /* translators: %s: Date. */ 37 printf( __( 'Yearly Archives: %s', 'twentythirteen' ), get_the_date( _x( 'Y', 'yearly archives date format', 'twentythirteen' ) ) ); 38 } else { 39 _e( 'Archives', 'twentythirteen' ); 40 } 41 ?> 42 </h1> 43 </header><!-- .archive-header --> 44 45 <?php 46 // Start the loop. 47 while ( have_posts() ) : 48 the_post(); 49 ?> 50 <?php get_template_part( 'content', get_post_format() ); ?> 51 <?php endwhile; ?> 52 53 <?php twentythirteen_paging_nav(); ?> 54 55 <?php else : ?> 56 <?php get_template_part( 'content', 'none' ); ?> 57 <?php endif; ?> 58 59 </div><!-- #content --> 60 </div><!-- #primary --> 61 62 <?php get_sidebar(); ?> 63 <?php get_footer(); ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 24 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |