I am just diving into the Genesis Framework.
In a normal theme, if you want to edit the header, you’d open the header.php
file.
But in genesis, the header file is not in the child theme. I have looked around and found a way to add custom header support, but i need some guidance.
The code below is to enable custom header support. I assume this goes into the functions.php file. But how to i actually add code here? What if i want to say pull in a custom field, or add a div to this section, or bring a slider in? How to i actually use this code to let me add html and php into the child theme header?
/** Add custom header support */
add_theme_support( 'genesis-custom-header',
array( 'width' => 960, 'height' => 100, 'textcolor' => '444',
'admin_header_callback' => 'minimum_admin_style' ) );
First you need to remove the header that is currently there. All of this goes into
functions.php
in your child themeThen is it as simple as building a function to act as your new header.
I normally try to use the same class and ID names so I can preserve some of the built in styles and save myself some work but that’s up to you. All you have to do is add whatever you want in the function and call it back in like this,
Hope that helps!
Just stumbled upon this post asking the same question. Great solution. An even easier way to customize certain parts of a genesis powered site is using the Genesis Simple Hooks plugin. Just do a search, it’s awesome.