';
}
endif;
add_action( 'business_carter_banner_header', 'business_carter_banner_header', 10 );
if( ! function_exists( 'business_carter_banner_title' ) ) :
/**
* Page Header
*/
function business_carter_banner_title(){
if ( ( is_front_page() && is_home() ) || is_home() ){
$your_latest_posts_title = business_carter_get_option( 'your_latest_posts_title' );?>
', '' );
}
if( is_archive() ){
the_archive_description( '
', '
' );
the_archive_title( '
', '
' );
}
if( is_search() ){ ?>
' . get_search_query() . '' ); ?>
' . esc_html__( 'Error 404', 'business-carter' ) . '';
}
}
endif;
if( ! function_exists( 'business_carter_banner_image' ) ) :
/**
* Banner Header Image
*/
function business_carter_banner_image( $image_url ) {
global $post;
if ( is_home() && ! is_front_page() ){
$image_url = get_the_post_thumbnail_url( get_option( 'page_for_posts' ), 'full' );
$header_image = get_header_image();
$fallback_image = ! empty( $header_image ) ? $header_image : get_template_directory_uri() . '/assets/images/default-header.jpg';
$image_url = ( ! empty( $image_url) ) ? $image_url : $fallback_image;
}
elseif( is_singular() ){
$image_url = get_the_post_thumbnail_url( get_option( 'page_for_posts' ), 'full' );
$header_image = get_header_image();
$fallback_image = ! empty( $header_image ) ? $header_image : get_template_directory_uri() . '/assets/images/default-header.jpg';
$image_url = ( ! empty( $image_url) ) ? $image_url : $fallback_image;
}
elseif( is_archive() ){
$image_url = ( ! empty( $archive_header) ) ? $archive_header : get_template_directory_uri() . '/assets/images/default-header.jpg';
}
elseif( is_search() ){
$image_url = ( ! empty( $search_header) ) ? $search_header : get_template_directory_uri() . '/assets/images/default-header.jpg';
}
elseif( is_404() ) {
$image_url = ( ! empty( $header_404) ) ? $header_404 : get_template_directory_uri() . '/assets/images/default-header.jpg';
}
return $image_url;
}
endif;
if ( ! function_exists( 'business_carter_posts_tags' ) ) :
/**
* Prints HTML with meta information for the current post-date/time and author.
*/
function business_carter_posts_tags() {
// Hide category and tag text for pages.
if ( 'post' === get_post_type() && has_tag() ) { ?>