';
}
endif;
add_action( 'business_element_banner_header', 'business_element_banner_header', 10 );
if( ! function_exists( 'business_element_banner_title' ) ) :
/**
* Page Header
*/
function business_element_banner_title(){
if ( ( is_front_page() && is_home() ) || is_home() ){
$your_latest_posts_title = business_element_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-element' ) . '';
}
}
endif;
if( ! function_exists( 'business_element_banner_image' ) ) :
/**
* Banner Header Image
*/
function business_element_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;
}
return $image_url;
}
endif;
if ( ! function_exists( 'business_element_posts_tags' ) ) :
/**
* Prints HTML with meta information for the current post-date/time and author.
*/
function business_element_posts_tags() {
// Hide category and tag text for pages.
if ( 'post' === get_post_type() && has_tag() ) { ?>