Archives (archive.php)

英語サイト用 Archives (archive.php)

  1. <?php get_header(); ?>
  2. <div id="content" class="clearfix">
  3.     <div id="contentInner">
  4.         <main <?php st_text_copyck(); ?>>
  5.             <article>
  6.                 <!--ぱんくず -->
  7.                 <?php if ( is_author() ) { //投稿者アーカイブ ?>
  8.                     <div id="breadcrumb">
  9.                     <ol>
  10.                         <li><a href="<?php echo esc_url( home_url() ); ?>"><span>HOME</span></a> > </li>
  11.                         <li><?php the_author_meta('display_name', get_query_var('author')); ?></li>
  12.                     </ol>
  13.                     </div>
  14.                 <?php } elseif(is_attachment()){ //添付ファイル ?>
  15.                     <div id="breadcrumb">
  16.                     <ol>
  17.                         <li><a href="<?php echo esc_url( home_url() ); ?>"><span>HOME</span></a> > </li>
  18.                         <?php if($post -> post_parent != 0 ): ?> >
  19.                             <li><a href="<?php echo get_permalink($post -> post_parent); ?>"><?php echo get_the_title($post -> post_parent); ?></a> > </li>
  20.                         <?php endif; ?>
  21.                             <li><?php echo $post -> post_title; ?></li>
  22.                     </ol>
  23.                     </div>
  24.                 <?php } elseif(is_date()){ //日付アーカイブ ?>
  25.                     <div id="breadcrumb">
  26.                     <ol>
  27.                         <li><a href="<?php echo esc_url( home_url() ); ?>"><span>HOME</span></a> > </li>
  28.                         <?php if(is_day()): //日別アーカイブ ?>
  29.                             <li><a href="<?php echo get_year_link(get_query_var('year')); ?>"><?php echo get_query_var('year'); ?>/ </a> > </li>
  30.                             <li><a href="<?php echo get_month_link(get_query_var('year'), get_query_var('monthnum')); ?>"><?php echo get_query_var('monthnum'); ?>/ </a> > </li>
  31.                             <li><?php echo get_query_var('day'); ?></li>
  32.                         <?php elseif(is_month()): //月別アーカイブ ?>
  33.                             <li><a href="<?php echo get_year_link(get_query_var('year')); ?>"><?php echo get_query_var('year'); ?>/ </a> > </li>
  34.                             <li><?php echo get_query_var('monthnum'); ?>/ </li>
  35.                         <?php elseif(is_year()): //年別アーカイブ ?>
  36.                             <li><?php echo get_query_var('year'); ?>/ </li>
  37.                         <?php endif; ?>
  38.                     </ol>
  39.                     </div>
  40.                 <?php }else{} ?>
  41.                 <!--/ ぱんくず -->
  42.                 <!--ループ開始-->
  43.                 <div class="post">
  44.                     <h1 class="entry-title">
  45.                         <?php if ( is_tax() ) { ?>
  46.                             <?php single_term_title(); ?>
  47.                         <?php } elseif ( is_day() ) { ?>
  48.                             Daily archive:<?php echo get_the_time( 'd/m/Y' ); ?>
  49.                         <?php } elseif ( is_month() ) { ?>
  50.                             Monthly archive:<?php echo get_the_time( 'd/Y' ); ?>
  51.                         <?php } elseif ( is_year() ) { ?>
  52.                             Archive by year:<?php echo get_the_time( 'Y' ); ?>
  53.                         <?php } elseif ( is_author() ) { ?>
  54.                             Article of<?php echo esc_html( get_queried_object()->display_name ); ?>
  55.                         <?php } elseif ( isset( $_GET['paged'] ) && !empty( $_GET['paged'] ) ) { ?>
  56.                             Blog Archive
  57.                         <?php } ?>
  58.                     </h1>
  59.                 </div><!-- /post -->
  60.                 <aside>
  61.                     <?php get_template_part( 'itiran' ); //投稿一覧読み込み ?>
  62.                     <?php get_template_part( 'st-pagenavi' ); //ページナビ読み込み ?>
  63.                 </aside>
  64.             </article>
  65.         </main>
  66.     </div>
  67.     <!-- /#contentInner -->
  68.     <?php get_sidebar(); ?>
  69. </div>
  70. <!--/#content -->
  71. <?php get_footer(); ?>

目次