archives and tax title on banner header

This commit is contained in:
Fabiano 2018-07-31 16:47:24 -03:00
parent 4da83f771f
commit 4debcce2ed
1 changed files with 23 additions and 2 deletions

View File

@ -8,16 +8,37 @@
<div class="bg-white-title title-header <?php if(is_singular() || is_archive() || is_search()) { echo 'singular-title'; }?>">
<h1 class="mb-0 text-truncate">
<?php
if(is_home()) { ?> Blog <?php bloginfo('title'); }
if(is_home()) { ?>
Blog <?php bloginfo('title');
}
elseif(is_singular()) {
/* echo mb_strimwidth(get_the_title(),0,25,'...'); */
the_title();
}
elseif(is_archive()) { echo get_the_archive_title(); }
elseif(is_search()){
_e('Search Results for ', 'tainacan-theme');
the_search_query();
}
elseif(is_tag() || is_category()){
single_term_title();
}
elseif(is_archive()){
if(have_posts()){
if ( is_day() ) :
printf( __( 'Daily Archives: %s', 'tainacan-theme' ), get_the_date() );
elseif ( is_month() ) :
printf( __( 'Monthly Archives: %s', 'tainacan-theme' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'tainacan-theme' ) ) );
elseif ( is_year() ) :
printf( __( 'Yearly Archives: %s', 'tainacan-theme' ), get_the_date( _x( 'Y', 'yearly archives date format', 'tainacan-theme' ) ) );
else :
_e( 'Archives', 'tainacan-theme' );
endif;
}
}
?>
</h1>