Community Forums › Forums › Archived Forums › Design Tips and Tricks › Custom header setup
- This topic has 6 replies, 2 voices, and was last updated 8 years, 11 months ago by Brad Dalton.
-
AuthorPosts
-
May 19, 2015 at 8:45 am #152752lgcuevabMember
Hi
I recently purchased Agency Child theme from Genesis, and I just know some basic html code.I want to display a custom size header in my homepage, about 1000 x 350, because default header size is 300 x 60.
I asked support team and they told me "the header dimensions were defined in the custom header support added in the themes functions.php file and I would need to customize this code, as well as adjust the theme style.css in order to make this customization"So in the functions.php file I found this piece of code:
//* Add support for custom header
add_theme_support( 'custom-header', array(
'header_image' => '',
'header-selector' => '.site-title a',
'header-text' => false,
'height' => 60,
'width' => 300,So, Is it just necessary to change the height and width sizes in this code? And what changes should I make in the theme style.css file?
Thanks.
Luis
May 19, 2015 at 8:56 am #152753Brad DaltonParticipantChange the dimensions in the PHP code and under the Site Header section of your style.css file, change any dimensions for width and weight to match your image. Normally there's only one change needed but sometimes there's 2.
May 19, 2015 at 9:03 am #152755lgcuevabMemberThanks.. my style.css code for Site Header is this:
Site Header
---------------------------------------------------------------------------------------------------- */.site-header {
background-color: #333;
left: 0;
min-height: 61px;
position: fixed;
top: 0;
width: 100%;
z-index: 999;
}.admin-bar .site-header {
top: 32px;So I suppose just change the min-height, am I right?
Thanks in advance.Luis
May 19, 2015 at 9:22 am #152756Brad DaltonParticipantAnd the title area
.title-area { float: left; padding: 16px 0; width: 1000px; } .header-image .site-title a { float: left; min-height: 350px; width: 100%; }
May 19, 2015 at 9:41 am #152758lgcuevabMemberThanks a lot
May 20, 2015 at 1:24 am #152863lgcuevabMemberHi braddalton, I did it and the header size changed.
But now I got a problem with it. The theme doesn`t display the primary nor the secondary navigation menus, I think both are behind the header and no visible.
My primary navigation menu is located by default in the Agency Pro theme, in genesis_after_header location and the secondary navigation menu is in footer location.To reposition the secondary menu before header, I replaced the actual code in my functions.php file for the secondary navigation menu.
Previous code:
//* Reposition the secondary navigation menu
remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );
add_action( ‘genesis_footer’, ‘genesis_do_subnav’, 7 );I replaced with this one:
//* Reposition the secondary navigation menu
remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );
add_action( ‘genesis_before_header’, ‘genesis_do_subnav’ );So right now It doesn`t display any of the menus. Do you know how can I fix this?
Thanks in advance.
LuisMay 20, 2015 at 1:40 am #152864Brad DaltonParticipantIf you increase the title area, you lose the header right widget so you can add the menu before or after the header.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.