/
var
/
www
/
barefootlaw.org
/
wp-content
/
themes
/
barefoot
/
template-parts
/
page-title
/
Upload File
HOME
<?php /** * The template part for displaying the elements in page title * * @package Aisconverse * @subpackage Covercase * @since Covercase 1.0 */ if ( function_exists( 'Basement_Page_Title' ) ) { $basement_page_title = Basement_Page_Title(); $title = isset( $basement_page_title['pt_elements']['title'] ) ? $basement_page_title['pt_elements']['title'] : ''; $breadcrumbs = isset( $basement_page_title['pt_elements']['breadcrumbs'] ) ? $basement_page_title['pt_elements']['breadcrumbs'] : ''; $icon = isset( $basement_page_title['pt_elements']['icon'] ) ? $basement_page_title['pt_elements']['icon'] : ''; $alternate = isset( $basement_page_title['pt_alternate'] ) ? $basement_page_title['pt_alternate'] : ''; $position = isset( $basement_page_title['pt_position'] ) ? $basement_page_title['pt_position'] : ''; } else { $title = true; $breadcrumbs = true; } $template_name = get_page_template_slug( get_queried_object_id() ); $title_meta_page = ''; if ( is_category() ) { $title_meta_page = __( 'Category posts', 'covercase' ); } elseif ( is_tag() ) { $title_meta_page = __( 'Tag posts', 'covercase' ); } elseif ( is_day() || is_month() || is_year() ) { $title_meta_page = basement_the_specific_title( 'archives', __( 'Archives', 'covercase' ), false ); } elseif ( is_author() ) { $title_meta_page = __( 'Author posts', 'covercase' ); } ?> <div class="container"> <div class="row"> <div class="col-sm-12 col-md-9 mx-auto"> <div class="page-title-content"> <?php if ( ! is_search() ) { if ( is_archive() ) { if ( basement_is_woo_grid_native() ) { ?> <div class="main-page-title"><span><?php do_action( 'covercase_woo_page_title' ); ?></span></div> <?php do_action( 'covercase_woo_sub_page_title' ); ?> <?php } else { if ( is_author() ) { $author_id = get_the_author_meta( 'ID' ); $size = 95; if ( ! empty( $author_id ) ) { $author_avatar = get_avatar( $author_id, $size ); echo '<div class="main-page-title-icon is-img">' . $author_avatar . '</div>'; } } if ( ! empty( $title ) ) { echo sprintf( '<div class="main-page-title"><span>%s</span></div>', get_the_archive_title() ); } ?> <div class="breadcrumb-block"> <ol class="breadcrumb"> <li class="breadcrumb-item"><span><span><?php echo esc_html( $title_meta_page ); ?></span></span></li> </ol> </div> <?php } } elseif ( is_singular( 'post' ) ) { ?> <div class="single-post-head"> <div class="single-post-head__meta"> <!--<div class="single-post-head__categories"><?php the_category( '<ins>—</ins>' ); ?></div>--> <div class="single-post-head__comments"><?php covercase_comments(); ?></div> </div> </div> <?php if ( ! empty( $title ) ) { if ( empty( $alternate ) ) { get_template_part( 'template-parts/page-title/title' ); } else { get_template_part( 'template-parts/page-title/title-alternative' ); } } ?> <?php } else { if ( ! empty( $icon ) ) { get_template_part( 'template-parts/page-title/icon' ); } if ( ! empty( $title ) ) { if ( empty( $alternate ) ) { get_template_part( 'template-parts/page-title/title' ); } else { get_template_part( 'template-parts/page-title/title-alternative' ); } } do_action( 'covercase_woo_breadcrumbs' ); } /*if ( is_home() || strpos( $template_name, 'blog' ) ) { if ( ! empty( $breadcrumbs ) ) { get_template_part( 'template-parts/page-title/breadcrumbs' ); } }*/ } else { echo sprintf( '<div class="main-page-title"><span>%s</span></div>', __( 'Search Results', 'covercase' ) ); $search_query = apply_filters( 'the_search_query', get_search_query( false ) ); if ( empty( $search_query ) && ! is_numeric( $search_query ) ) { $search_query = '" "'; } ?> <div class="breadcrumb-block"> <ol class="breadcrumb"> <li class="breadcrumb-item"><span><span><?php echo esc_attr( $search_query ); ?></span></span></li> </ol> </div> <?php } ?> </div> </div> </div> </div> <?php if ( is_singular( 'post' ) ) { ?> <div class="breadcrumb-block single-post-head__info"> <div class="row align-items-center"> <div class="col-lg-6"> <?php $author_id = get_post_field( 'post_author' ); $author = get_the_author_meta( 'display_name', $author_id ); $author_link = get_author_posts_url( $author_id ); $author_id = empty($author_id) ? get_the_author_meta( 'ID' ) : $author_id; ?> <div class="single-post-head__auth"> <?php if ( ! empty( $author_id ) ) { $author_avatar = get_avatar( $author_id, 40 ); printf('%s', $author_avatar); } ?> <?php echo '<a href="' . $author_link . '" class="auth-link" title="' . $author . '">' . $author . '</a>'; ?><span class="posted-on"><ins>—</ins><?php covercase_entry_date(); ?></span> </div> </div> <div class="col-lg-6"> <?php if ( ! empty( $breadcrumbs ) ) { get_template_part( 'template-parts/page-title/breadcrumbs' ); } ?> </div> </div> </div> <?php } elseif ( ! is_archive() && ! is_home() && ! is_search() && ! basement_is_woo_pages() && ! strpos( $template_name, 'blog' ) ) { if ( ! empty( $breadcrumbs ) ) { get_template_part( 'template-parts/page-title/breadcrumbs' ); } }