'fff', 'header-text' => false, 'width' => 1600, 'height' => 400, 'flex-width' => true, 'flex-height' => true, 'wp-head-callback' => 'author_writer_header_style', 'default-image' => get_parent_theme_file_uri( '/assets/images/header_img.png' ), ) ) ); register_default_headers( array( 'default-image' => array( 'url' => '%s/assets/images/header_img.png', 'thumbnail_url' => '%s/assets/images/header_img.png', 'description' => __( 'Default Header Image', 'author-writer' ), ), ) ); } add_action( 'after_setup_theme', 'author_writer_custom_header_setup' ); if ( ! function_exists( 'author_writer_header_style' ) ) : add_action( 'wp_enqueue_scripts', 'author_writer_header_style' ); function author_writer_header_style() { if ( get_header_image() ) : $author_writer_custom_css = " .header-img { background-image: url('".esc_url(get_header_image())."') !important; background-position: center top !important; height: 350px; background-size: cover !important; display: block; } .single-page-img { background-image: url('".esc_url(get_header_image())."') !important; background-position: center top !important; background-size: cover !important; height: 350px; object-fit: cover; } @media (max-width: 1000px) { .header-img, .single-page-img, .external-div .box-image img, .external-div { height: 200px; } }"; wp_add_inline_style( 'author-writer-style', $author_writer_custom_css ); endif; } endif;