Twenty Eleven header image resize not working
-
Disclaimer: I am no programmer, but I can read/troubleshoot code.
I’ve read various posts on how to change the header image size on Twenty Eleven theme (v3.4.1). My logo is 375px X 50px. I have updated the following code in the functions.php file to reflect the size change to these dimensions:
// Add support for custom headers. $custom_header_support = array( // The default header text color. 'default-text-color' => '000', // The height and width of our custom header. 'width' => apply_filters( 'twentyeleven_header_image_width', 375 ), 'height' => apply_filters( 'twentyeleven_header_image_height', 50 ), // Support flexible heights. 'flex-height' => true, // Random image rotation by default. 'random-default' => true, // Callback for styling the header. 'wp-head-callback' => 'twentyeleven_header_style', // Callback for styling the header preview in the admin. 'admin-head-callback' => 'twentyeleven_admin_header_style', // Callback used to display the header preview in the admin. 'admin-preview-callback' => 'twentyeleven_admin_header_image', ); add_theme_support( 'custom-header', $custom_header_support );
Also, in Appearance > Header, the recommended image size says, “You can upload a custom header image to be shown at the top of your site instead of the default one. On the next screen you will be able to crop the image.
Images should be at least 375 pixels wide. Suggested width is 375 pixels. Suggested height is 50 pixels.” This tells me that WP is recognizing my desired image size.Yet when I publish the content, it stretches my header across the body of the page (I assume the default 1000px wide), though it is shorter than the other images pre-loaded on the Twenty Eleven theme.
How can I reduce the width of the image displayed to 375 pixels?
Thanks for the help.
Website: brandxgoods.com
- The topic ‘Twenty Eleven header image resize not working’ is closed to new replies.