I have recently downloaded a wordpress theme who’s archive.php did not contain any headings. Below is a snippet of code to create a more meaningful title on a archive page so the user knows what they are searching for.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<h2 class="archive"> <?php if ( is_day() ) : ?> <?php _e('Archive for','appthemes'); ?> <?php the_time('F jS, Y'); ?> <?php elseif ( is_month() ) : ?> <?php _e('Archive for','appthemes'); ?> <?php the_time('F, Y'); ?> <?php elseif ( is_year() ) : ?> <?php _e('Archive for','appthemes'); ?> <?php the_time('Y'); ?> <?php elseif ( is_category() ) : ?> <?php _e('Archive for','appthemes'); ?> <?php single_cat_title(); ?> <?php elseif ( is_tag() ) : ?> <?php printf( __( 'Posts Tagged with', 'appthemes' )); ?> “<?php single_tag_title(); ?>” <?php elseif ( is_author() ) : ?> <?php _e('Author Archive','appthemes'); ?> <?php else : ?> <?php _e( 'Archive', 'appthemes' ); ?> <?php endif; ?> </h2> |