issue with get_custom_header returing 0 for height/width
-
when useing get_custom_header the array returns the height and width as 0px
in my functions.php i have
$headerDefaults = array( 'default-image' => get_template_directory_uri() . '/images/header.png', 'random-default' => false, 'flex-height' => false, 'flex-width' => true, 'uploads' => true, 'width' => 450, 'height' => 150, );in my header.php i have
<img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="" />
the array returnsstdClass Object ( [url] => http://democustom.globalclassroomportal.com/wp-content/uploads/sites/9/2014/07/demo-custom-logo1.png [thumbnail_url] => http://www.msite.com/wp-content/uploads/sites/9/2014/07/demo-custom-logo1.png [width] => 0 [height] => 0 [attachment_id] => 231 )
The topic ‘issue with get_custom_header returing 0 for height/width’ is closed to new replies.