'', 'default-text-color' => '000000', 'width' => 1000, 'height' => 250, 'flex-height' => true, ) ) ); } add_action( 'after_setup_theme', 'academic_custom_header_setup' ); if ( ! function_exists( 'academic_custom_header' ) ) : /** * Custom Header Codes * * @since Academic 0.3 * */ function academic_custom_header() { /** * Filter the default twentysixteen custom header sizes attribute. * * @since Academic 0.3 * */ $header_image_meta = academic_header_image_meta_option(); if ( ( '' == $header_image_meta && ! get_header_image() ) || ! $header_image_meta ) { return; } ?> get_queried_object_id( $post ); if( ( is_home() && $page_on_front == $page_id ) ) { return; } else { // Set header image by comparing the meta values $header_image = academic_header_image_meta_option(); if ( is_array( $header_image ) ) { $header_image = $header_image[0]; } else { $header_image = $header_image; } $css .= ' #banner-image { background-image: url("'.esc_url( $header_image ).'"); }'; } wp_add_inline_style( 'academic-style', $css ); } endif; add_action( 'wp_enqueue_scripts', 'academic_header_inline_css', 10 );