saragreenlaw
12/7/2014 - 4:47 AM

Add widget area to single post Genesis

Add widget area to single post Genesis

genesis_register_sidebar( array(
'id' => 'your-widget',
'name' => __( 'Your Widget', 'theme' ),
'description' =>  __( 'Your Widget description.', 'theme' ),
) );

add_action( 'hook', 'your_widget', 5 );
function your_widget() {
if ( is_single() ) {
genesis_widget_area( 'your-widget', array(
			'before' => '<div class="your-widget" class="widget-area">',
			'after'  => '</div>',
		) );
	}
 
}