WordPress.org

Ready to get started?Download WordPress

Forums

Spun
[resolved] Make header larger (8 posts)

  1. rracanel517
    Member
    Posted 1 year ago #

    Hey Caroline,

    Thanks for making such a great theme! I'm trying to make my custom header larger. Right now the max is 150X150. Is there a way to change this in the stylesheet or anywhere else? It's a little too small right now. I've tried a few things and it isn't working..

    If that's not possible, any other suggestions?

    Thanks!

  2. Caroline Moore
    Member
    Theme Author

    Posted 1 year ago #

    You can use a child theme to do this. I recommend using Firebug for CSS work--makes it much easier.

    Style.css line 670 is where a max height gets defined in the stylesheet. You can set a new max-height on the image in your child theme's style.css.

    You also need to create a new functions.php file in your child theme and filter the width/height on the custom header. 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:

    /**
     * Change default custom header size
     */
    function spun_custom_header_args( $args ) {
    
    	$args = array(
    		'width'   => 200,
    		'height'  => 200,
    	);
    	return $args;
    
    }
    add_filter( 'spun_custom_header_args', 'spun_custom_header_args', 999 );

    Untested, but this gives you an idea of where to start.

  3. rracanel517
    Member
    Posted 1 year ago #

    Thanks so much!

  4. gfr77
    Member
    Posted 1 year ago #

    I also want to change the header image.
    In this theme its 150x150 and i want to put an image that has 200x400

    I have a Child Theme to do my changes, but i don't know how to change the image header.

    What i have to do?

    I have to create my own custom-header.php and change these lines:

    function spun_custom_header_args( $args ) {
    
    	$args = array(
    		'width'   => 200,
    		'height'  => 200,
    	);
    	return $args;
    
    }
    add_filter( 'spun_custom_header_args', 'spun_custom_header_args', 999 );

    Or I have to create a file called functions.php i put the same lines there

    How to call from the main css spun-child.css to functions that are in function.php?

  5. Caroline Moore
    Member
    Theme Author

    Posted 1 year ago #

    You add the above code to a new file, functions.php, in your child theme. You don't need to worry about calling it from the stylesheet, WordPress automatically does that because it's part of the child theme.

    If you have further questions, please post a new topic, as this one has been resolved. Thanks.

  6. kmpaperie
    Member
    Posted 1 year ago #

    Was this ever fixed? Im having the same issue.

  7. flaviove
    Member
    Posted 1 year ago #

    The only need is to change the size you want at .../theme/spun/inc/custom-header.php

    function spun_custom_header_setup() {
    $args = array(
    'default-image' => '',
    'default-text-color' => '999',
    'width' => 500, <==========here
    'height' => 200, <==========here

    Cheers,

  8. rachellucie
    Member
    Posted 1 year ago #

    Hi there,

    I have created a child theme, installed the style.css and the new functions.php following the instructions - however, I still get a crop box when uploading my theme that is smaller than my new dimensions:

    my logo is 280x40

    I made the functions.php 300x50
    I made the #masthead max size 400
    BUT the crop box is showing as being 240x40.

    Any help with this would be appreciated, thanks

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic