Lego2012
12/16/2016 - 2:58 PM

Register a widget area called 'my-widget'

Register a widget area called 'my-widget'

/* ## My Widget
--------------------------------------------- */

.my-widget {
	background: #fff;
	margin-top: 40px;
	padding: 20px;
}
<?php

//* Register a widget area called 'my-widget'
genesis_register_sidebar( array(
	'id'            => 'my-widget',
	'name'          => __( 'My Widget', 'sample' ),
	'description'   => __( 'This is my widget', 'themename' ),
) );

//* Hook my-widget area after the header
add_action( 'genesis_after_header', 'add_my_widget' );
function add_my_widget() {
	genesis_widget_area ('my-widget', array (
		'before' => '<div class="wrap"><div class="my-widget widget-area">',
		'after'  => '</div></div>',
		)
	);
}