forked from trepmal/defenestrate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
part-heading.php
38 lines (31 loc) · 1.24 KB
/
part-heading.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
if ( ! is_archive() && ! is_search() ) return;
?>
<header class="archive-header">
<div class="liner">
<h1 class="archive-title">
<?php
if ( is_category() ) :
printf( __( 'Category Archives: %s', 'defenestrate' ), '<span>' . single_cat_title( '', false ) . '</span>' );
elseif ( is_search() ) :
printf( __( 'Search Results for: %s', 'defenestrate' ), get_search_query() );
elseif ( is_author() ) :
printf( __( 'Author Archives: %s', 'defenestrate' ), '<span>' . get_the_author() . '</span>' );
elseif ( is_day() ) :
printf( __( 'Daily Archives: %s', 'defenestrate' ), '<span>' . get_the_date() . '</span>' );
elseif ( is_month() ) :
printf( __( 'Monthly Archives: %s', 'defenestrate' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'defenestrate' ) ) . '</span>' );
elseif ( is_year() ) :
printf( __( 'Yearly Archives: %s', 'defenestrate' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'defenestrate' ) ) . '</span>' );
else :
_e( 'Archives', 'defenestrate' );
endif;
?>
</h1>
<?php
if ( category_description() ) : // Show an optional category description
?><div class="archive-meta"><?php echo category_description(); ?></div> <?php
endif;
?>
</div>
</header>