Always display page header with title line, even if the result is an empty.

This commit is contained in:
mateuswetah 2020-08-12 09:41:55 -03:00
parent 02398e3ed1
commit 82e6323019
2 changed files with 41 additions and 40 deletions

View File

@ -67,7 +67,7 @@
</div> </div>
</nav> </nav>
<a href="javascript:" id="return-to-top" style="<?php echo (get_theme_mod( 'tainacan_footer_color', 'dark' ) == 'colored' ? 'border: 1px solid white;' : '') ?>"><i class="tainacan-icon tainacan-icon-arrowup"></i></a> <a href="javascript:" id="return-to-top" style="<?php echo (get_theme_mod( 'tainacan_footer_color', 'dark' ) == 'colored' ? 'background-color: #2c2d2d;' : '') ?>"><i class="tainacan-icon tainacan-icon-arrowup"></i></a>
<?php if ( !is_page_template( 'page-templates/landing.php' ) ) : ?> <?php if ( !is_page_template( 'page-templates/landing.php' ) ) : ?>
<?php tainacan_interface_the_breadcrumb(); ?> <?php tainacan_interface_the_breadcrumb(); ?>

View File

@ -1,45 +1,46 @@
<?php if ( have_posts() ) : ?> <div class="tainacan-title">
<div class="tainacan-title"> <div class="border-jelly-bean tainacan-title-page" style="border-width: 2px !important;">
<div class="border-jelly-bean tainacan-title-page" style="border-width: 2px !important;"> <ul class="list-inline mb-1 d-flex">
<ul class="list-inline mb-1 d-flex"> <li class="list-inline-item text-midnight-blue font-weight-bold title-page">
<li class="list-inline-item text-midnight-blue font-weight-bold title-page"> <h1>
<h1> <?php if ( is_home() ) {
<?php if ( is_home() ) { if ( get_option( 'page_for_posts' ) ) :
if ( get_option( 'page_for_posts' ) ) : echo get_the_title( get_option( 'page_for_posts' ) );
echo get_the_title( get_option( 'page_for_posts' ) ); else :
_e( 'Blog Posts', 'tainacan-interface' );
endif;
} elseif ( is_singular() ) {
bloginfo( 'title' );
} elseif ( is_search() ) {
_e( 'Search Results for', 'tainacan-interface' );
echo ' "' , get_search_query(), '"';
} elseif ( is_tag() || is_category() || is_tax() ) {
single_term_title();
} elseif ( is_archive() ) {
if ( have_posts() ) {
if ( is_day() ) :
printf( __( 'Daily Archives: %s', 'tainacan-interface' ), get_the_date() );
elseif ( is_month() ) :
printf( __( 'Monthly Archives: %s', 'tainacan-interface' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'tainacan-interface' ) ) );
elseif ( is_year() ) :
printf( __( 'Yearly Archives: %s', 'tainacan-interface' ), get_the_date( _x( 'Y', 'yearly archives date format', 'tainacan-interface' ) ) );
elseif ( is_author() ) :
echo get_the_author();
elseif ( 'tainacan-collection' == get_post_type() ) :
echo tainacan_the_collection_name();
else : else :
_e( 'Blog Posts', 'tainacan-interface' ); echo get_the_archive_title();
endif; endif;
} elseif ( is_singular() ) { }
bloginfo( 'title' ); } ?>
} elseif ( is_search() ) { </h1>
_e( 'Search Results for', 'tainacan-interface' ); </li>
echo ' "' , get_search_query(), '"'; <li class="list-inline-item float-right title-back align-self-end ml-auto"><a href="javascript:history.go(-1)"><?php _e( 'Back', 'tainacan-interface' ); ?></a></li>
} elseif ( is_tag() || is_category() || is_tax() ) { </ul>
single_term_title();
} elseif ( is_archive() ) {
if ( have_posts() ) {
if ( is_day() ) :
printf( __( 'Daily Archives: %s', 'tainacan-interface' ), get_the_date() );
elseif ( is_month() ) :
printf( __( 'Monthly Archives: %s', 'tainacan-interface' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'tainacan-interface' ) ) );
elseif ( is_year() ) :
printf( __( 'Yearly Archives: %s', 'tainacan-interface' ), get_the_date( _x( 'Y', 'yearly archives date format', 'tainacan-interface' ) ) );
elseif ( is_author() ) :
echo get_the_author();
elseif ( 'tainacan-collection' == get_post_type() ) :
echo tainacan_the_collection_name();
else :
echo get_the_archive_title();
endif;
}
} ?>
</h1>
</li>
<li class="list-inline-item float-right title-back align-self-end ml-auto"><a href="javascript:history.go(-1)"><?php _e( 'Back', 'tainacan-interface' ); ?></a></li>
</ul>
</div>
</div> </div>
</div>
<?php if ( have_posts() ) : ?>
<div class="mt-5 tainacan-list-post margin-md-two-column"> <div class="mt-5 tainacan-list-post margin-md-two-column">
<?php while ( have_posts() ) : ?> <?php while ( have_posts() ) : ?>