apamphilon

Conditional Category blog titles

<?php if (is_category()) { ?>
  <h2 class="section-title">Archive for ‘<?php single_cat_title(); ?>’</h2>
  <?php } elseif( is_tag() ) { ?>
  <h2 class="section-title">Posts Tagged ‘<?php single_tag_title(); ?>’</h2>
  <?php } elseif (is_day()) { ?>
  <h2 class="section-title"><?php the_time('F jS, Y'); ?></h2>
  <?php } elseif (is_month()) { ?>
  <h2 class="section-title"><?php the_time('M Y'); ?></h2>
  <?php } elseif (is_year()) { ?>
  <h2 class="section-title"><?php the_time('Y'); ?></h2>
  <?php } elseif (is_author()) { ?>
  <h2 class="section-title">Archive</h2>
  <?php } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  <h2 class="section-title">Archive</h2>
  <?php } else { ?>
  <h2 class="section-title">Latest Posts</h2>
<?php } ?>

Comments: