width . '" height="' . get_custom_header()->height . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '">'; } return $output; } function ample_header_image_markup_filter() { add_filter( 'get_header_image_tag', 'ample_header_image_markup', 10, 3 ); } add_action( 'ample_header_image_markup_render', 'ample_header_image_markup_filter' ); /****************************************************************************************/ if ( ! function_exists( 'ample_render_header_image' ) ) : /** * Display the header image. */ function ample_render_header_image() { if ( function_exists( 'the_custom_header_markup' ) ) { do_action( 'ample_header_image_markup_render' ); the_custom_header_markup(); } else { $header_image = get_header_image(); if ( ! empty( $header_image ) ) { ?> <?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> ' . get_the_author() . '' ); /* Since we called the_post() above, we need to * rewind the loop back to the beginning that way * we can run the loop properly, in full. */ rewind_posts(); elseif ( is_day() ) : $ample_header_title = sprintf( __( 'Day: %s', 'ample' ), '' . get_the_date() . '' ); elseif ( is_month() ) : $ample_header_title = sprintf( __( 'Month: %s', 'ample' ), '' . get_the_date( 'F Y' ) . '' ); elseif ( is_year() ) : $ample_header_title = sprintf( __( 'Year: %s', 'ample' ), '' . get_the_date( 'Y' ) . '' ); elseif ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) : $ample_header_title = woocommerce_page_title( false ); else : $ample_header_title = __( 'Archives', 'ample' ); endif; } elseif ( is_404() ) { $ample_header_title = __( 'Page NOT Found', 'ample' ); } elseif ( is_search() ) { $ample_header_title = sprintf( __( 'Search Results For: %s', 'ample' ), '' . get_search_query() . '' ); } elseif ( is_page() ) { $ample_header_title = get_the_title(); } elseif ( is_single() ) { $ample_header_title = get_the_title(); } elseif ( is_home() ) { $queried_id = get_option( 'page_for_posts' ); $ample_header_title = get_the_title( $queried_id ); } else { $ample_header_title = ''; } return $ample_header_title; } endif; /****************************************************************************************/ if ( ! function_exists( 'ample_breadcrumb' ) ) : /** * Display breadcrumb on header. * * If the page is home or front page, slider is displayed. * In other pages, breadcrumb will display if breadcrumb NavXT plugin exists. */ function ample_breadcrumb() { if ( function_exists( 'bcn_display' ) ) { echo ' '; } } endif; ?>