WordPress.org

Support

Support » Themes and Templates » Twenty Thirteen » [Resolved] How to change Twenty Thirteen header image height

[Resolved] How to change Twenty Thirteen header image height

  • I’ve been scratching my head since last night and finally solved the problem. Posting here since there’s a lot of open threads with the same issue. To increase (or decrease, whatever floats your boat) Twenty Thirteen’s header image height is quite simple. First, add the code bellow to the functions.php file of your child theme:

    function yourchildtheme_custom_header_setup() {
    	$args = array( 'height' => 400 );
    	add_theme_support( 'custom-header', $args );
    }
    add_action( 'after_setup_theme', 'yourchildtheme_custom_header_setup' );

    Then add this to your css:

    .site-header .home-link {
    	min-height: 400px;
    }

    You can use any value for the height, of course.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Super, thank you 🙂 works perfect.

    Aargh! Spent all night scratching my head over this! Thanks so much!

    Edit: it’s not working… do I need to edit the child theme’s custom-header.php as well? Am I missing something obvious (like renaming “yourchildtheme” to something else)?

    If you use a child theme you need to add the code to the functions.php of the child theme, if it doesn’t have this file you’ll need to create it.

    http://codex.wordpress.org/Child_Themes#Using_functions.php

    aleksandrarocks

    @aleksandrarocks

    Hello FkdkWeb,

    I tried using your method – but I can’t seem to get it to work. Are you able to determine what am I doing wrong?

    Here’s the functions.php – I added it just under this first line:

    /**
     * Add support for a custom header image.
     */
    require get_template_directory() . '/inc/custom-header.php';
    
    /**
     * Bigger header.
     */
    function twentythirteen_custom_header_setup() {
    	$args = array( 'height' => 300 );
    	add_theme_support( 'custom-header', $args );}
    
    add_action( 'after_setup_theme', 'twentythirteen_custom_header_setup' );

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    And the CSS:

    /*Make site header height larger*/
    .site-header .home-link {min-height: 300px;}

    This is at visualizingclimatechange.ca.

    Thanks!

    Aleksa

    WPyogi

    @wpyogi

    Forum Moderator

    @aleksandrarocks – first you need to start your own thread – this one is marked resolved.

    You also need to be using a child theme – otherwise all of your changes will be lost when WP is updated.

    Then once that is set up, see this thread:

    http://wordpress.org/support/topic/massive-headers?replies=23

    aleksandrarocks

    @aleksandrarocks

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] How to change Twenty Thirteen header image height’ is closed to new replies.
Skip to toolbar