1. Register New Widget
First, you need to do is add some php code to your child themes functions.php file.
//* Register widget areas
genesis_register_sidebar( array(
'id' => 'before-header',
'name' => __( 'Before Header', 'genesis' ),
'description' => __( 'This is the before header widget area.', 'themename' ),
) );
This code creates the new widget which is displayed in your Widgets page and includes:
- A unique i.d. – You can use this as the selector to style your new widget – it must be unique
- A name for your new widget – Displayed in the Widget on the widgets page – you can name it what you want
- A description for your widget – Displayed in the Widget on the widgets page
2. Hook in the widget
//* Hook before header widget area above header
add_action( 'genesis_before', 'themename_before_header' );
function themename_before_header() {
genesis_widget_area( 'before-header', array(
'before' => '<div class="before-header" class="widget-area"><div class="wrap">',
'after' => '</div></div>',
) );
}
3.Create your menu
Go to appearance Menus – create your top level menu
4. Add menu to widget
Go to appearance widgets and add a menu widget to your new widget
5. Style your menu
I’ll get back to you on this step when you have done all of the above!