k-isabelle
5/31/2018 - 4:29 PM

Archive Template

Archive Template

<?php if (is_category()) { ?>
  <h2 class="archive-title h2">
    <span><?php _e( 'Posts Categorized:', 'bonestheme' ); ?></span> <?php single_cat_title(); ?>
  </h2>

<?php } elseif (is_tag()) { ?>
  <h2 class="archive-title h2">
    <span><?php _e( 'Posts Tagged:', 'bonestheme' ); ?></span> <?php single_tag_title(); ?>
  </h2>

<?php } elseif (is_author()) {
  global $post;
  $author_id = $post->post_author;
?>
  <h2 class="archive-title h2">

    <span><?php _e( 'Posts By:', 'bonestheme' ); ?></span> <?php the_author_meta('display_name', $author_id); ?>

  </h2>
<?php } elseif (is_day()) { ?>
  <h2 class="archive-title h2">
    <span><?php _e( 'Daily Archives:', 'bonestheme' ); ?></span> <?php the_time('l, F j, Y'); ?>
  </h2>

<?php } elseif (is_month()) { ?>
    <h2 class="archive-title h2">
      <span><?php _e( 'Monthly Archives:', 'bonestheme' ); ?></span> <?php the_time('F Y'); ?>
    </h2>

<?php } elseif (is_year()) { ?>
    <h2 class="archive-title h2">
      <span><?php _e( 'Yearly Archives:', 'bonestheme' ); ?></span> <?php the_time('Y'); ?>
    </h2>
<?php } ?>