WordPress.org

Forums

Buttercream
Header width (4 posts)

  1. Ausagcareers
    Member
    Posted 1 year ago #

    I'd like to increase my header image width

    I found the part of the code where it was set to 850 and changed it to 1200 but still showing up at 850... :(

    Was it only in custom header php that i needed to make the edit?

  2. Ausagcareers
    Member
    Posted 1 year ago #

    I would also like to move the menu from the bottom of the page to underneath the header image, could you please help me with this too?

  3. WPyogi
    Forum Moderator
    Posted 1 year ago #

    You'll need to use a Child Theme to make these kinds of changes - do you have that set up.

    http://codex.wordpress.org/Child_Themes

    If you make changes to theme files they will be overwritten when the theme is updated.

  4. Caroline Moore
    Member
    Theme Author

    Posted 1 year ago #

    Definitely use a child theme to do this so your changes do not get overwritten by future theme updates.

    There are rules in the theme's style.css that prevent the header image from being wider than its container -- you'll need to add a #custom-header-image rule to your child theme's style.css and set a larger width, probably 1200px to match the size of your new custom header. I don't know how that might affect the rest of the layout, though, so you may need to play around with it a bit. I recommend using a browser addon like Firebug for this kind of CSS troubleshooting.

    You also need to create a new functions.php file in your child theme and filter the width/height on the theme's custom header, rather than changing the value directly in the theme. Look in the theme's /inc/custom-header.php file to see how the custom header's default arguments are defined. Then add a filter to your child theme's functions.php like so:

    <?php
    /**
     * Change default custom header size
     */
    function buttercream_custom_header_args( $args ) {
    
    	$args = array(
    		'width'   => 1200,
    	);
    	return $args;
    
    }
    add_filter( 'buttercream_custom_header_args', 'buttercream_custom_header_args', 999 );

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.