WordPress.org

Ready to get started?Download WordPress

Forums

Theme customiser Header image uploads (1 post)

  1. IstanbulMMV
    Member
    Posted 1 year ago #

    As per foralien's observation, is it possible for custom header images uploaded via the Theme Customiser to inherit width and height parameters?

    $args = array(
    	'flex-width'    => false,
    	'width'         => 435,
    	'flex-height'    => false,
    	'height'        => 290,
    	'default-image' => get_template_directory_uri() . '/images/header.jpg',
    );
    add_theme_support( 'custom-header', $args );

    The above works fine if the image is uploaded via the standard theme header page, but height and width parameters are ignored by the header_image() call if the image is uploaded via the Theme Customizer.

Topic Closed

This topic has been closed to new replies.

About this Topic