Viewing 15 replies - 1 through 15 (of 20 total)
  • Theme Author gamerpotion

    (@gamerpotion)

    Hi. first create a child theme (so that if theme gets updated, you wont lose the changes), look here

    Then copy over the functions file to child theme folder.

    In that functions file, find this code:-

    // Set height and width, with a maximum value for the width.
    		'height'                 => 80,
    		'width'                  => 300,
    		'max-width'              => 300,

    Now simply change max-width to your choice. You can also change the height. Then go to Header section in dashboard and try uploading new header.

    Hello, I have similar issue, I want the header image to be bigger.

    I tried pasting this code in functions file of my child theme, but all it does is makes the whole site o completely blank.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    @angius, share us the code in your Child Theme functions.php fiel through PasteBin: https://pastebin.com

    @andrew, sure, here you go: https://pastebin.com/T3f3cctb

    To be precise, I tried swapping content of this functions.php with content of the main theme’s file and editing values there, but again – blank site.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Oh right I think this may not have been good advice:

    Then copy over the functions file to child theme folder.

    That generally breaks your website if you do that, although maybe it doesn’t in the case of this theme.

    1 second while I get that theme’s code…

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Which version of the theme are you using?

    The most recent one, I believe, 1.0.6

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Replace all of the code in your Child Theme functions.php file with this:

    <?php
    // Stop the original header function from being loaded
    remove_action( 'after_setup_theme', 'newgamer_custom_header_setup' );
    
    // Create our own header function
    function childtheme_custom_header_setup() {
    	$args = array(
    
    		// Set height and width, with a maximum value for the width.
    		'height'                 => 80,
    		'width'                  => 300,
    		'max-width'              => 300,
                    'header-text'            => false,
    
    		// Support flexible height and width.
    		'flex-height'            => false,
    		'flex-width'             => false,
    
    		// Random image rotation off by default.
    		'random-default'         => false,
    
    	        'uploads'                => true,
    	        'wp-head-callback'       => '',
    	        'admin-head-callback'    => '',
    	        'admin-preview-callback' => '',
    	);
    
    }
    
    // Load the custom child theme header function
    add_action( 'after_setup_theme', 'childtheme_custom_header_setup' );
    
    ?>

    So you’d change the values 80/300 in that function to match what you want

    Ok, the page is no longer going blank, that’s a success.

    But WordPress still wants to crop the header to 300×80, both in header settings and in customize theme settings, and won’t allow me to use full size image…

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Hmm can you link your site

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Which image is it you’re referring to?

    The image is not in the header, but here you go: https://angius.hol.es/wp-content/uploads/2014/07/logo_21.png
    As you can see now, only one half of this image fits in the header.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Oh I see. Have you activated your Child Theme by the way? Also, what values did you change for your custom header function (above)?

    Yes, the child theme is activated.
    Here, full content of child’s functions.php: https://pastebin.com/UuVj9p9X

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘header image size is too small’ is closed to new replies.