Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change the height of the header of the default theme

  • @gurkfittan

    Member

    I can’t find any documentation on this anywhere.
    With the css you can only make it larger but not smaller by editing #header. Also the navigation div seem to be fixed so changing the header height messes everything up.

    Same thing with #header h1. It seem to be a fixed size that you cant change in the css. If I add a border to it it’s much larger than the text in it even with margin:0 padding:0.

    Can anyone please point me in the right direction. I’m going crazy here,

Viewing 3 replies - 1 through 3 (of 3 total)
  • @mercime

    Participant

    It’s documented in functions code.
    – Build a child theme of bp-default theme https://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/
    – To change header height/width, create a functions.php in child theme folder and apply filters per https://buddypress.trac.wordpress.org/browser/tags/1.5.2/bp-themes/bp-default/functions.php#L91
    – To change `#header h1`, in same child theme’s functions.php you’ll override parent theme’s function (lines 213 to 270) at https://buddypress.trac.wordpress.org/browser/tags/1.5.2/bp-themes/bp-default/functions.php with:
    `function bp_dtheme_admin_header_style() {
    ?>

    // add/revise styles you see in file

    <?php
    }`

    @gurkfittan

    Member

    Thanks for the comprehensive answer but I’ve already tried that and the header size won’t budge. For example I’ve put the height to 13 and it does nothing.
    ` define( ‘HEADER_IMAGE_WIDTH’, apply_filters( ‘bp_dtheme_header_image_width’, 1250 ) );
    define( ‘HEADER_IMAGE_HEIGHT’, apply_filters( ‘bp_dtheme_header_image_height’, 13 ) );`

    `function bp_dtheme_admin_header_style() {
    ?>

    #headimg {
    position: relative;
    color: #fff;
    background: url();
    -moz-border-radius-bottomleft: 6px;
    -webkit-border-bottom-left-radius: 6px;
    -moz-border-radius-bottomright: 6px;
    -webkit-border-bottom-right-radius: 6px;
    margin-bottom: 20px;
    height: 13px;
    }`

    I’ve also tried with disabling custom header `define( ‘BP_DTHEME_DISABLE_CUSTOM_HEADER’, true );` and nothing.

    @gurkfittan

    Member

    To clarify here is a screenprint of the problem. http://i40.tinypic.com/6z3alc.jpg
    It’s the div’s with blue and red border that won’t resize no matter what I do.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change the height of the header of the default theme’ is closed to new replies.
Skip to toolbar