Brad Dalton https://wpsites.net/web-design/widget-genesis/
/** step 3 - Styling the New Widget **/
.custom-widget {
background-color: grey;
margin: 5px 0 10px;
padding: 10px;
overflow: hidden;
}
/** Brad Dalton **/
/** step 1 - Register New Widget **/
genesis_register_sidebar( array(
'id' => 'custom-widget',
'name' => __( 'Custom Widget', 'genesis' ),
'description' => __( 'Custom Widget Area', 'childtheme' ),
) );
/** This code simply creates the new widget which is displayed in your Widgets page and includes:
/** 1. A unique i.d – You can use this as the selector to style your new widget
/** 2. A name for your new widget – Displayed in the Widget on the widgets page
/** 3. A description for your widget – Displayed in the Widget on the widgets page
/** step 2 - Hooking in New Widget **/
add_action( 'genesis_after_header', 'add_genesis_widget_area' );
function add_genesis_widget_area() {
genesis_widget_area( 'custom-widget', array(
'before' => '<div class="custom-widget widget-area">',
'after' => '</div>',
) );
}