Below is the code that you would use to register a widget area for your site:
/** Register widget areas */
genesis_register_sidebar( array(
'id' => 'after-post-ad',
'name' => __( 'After Post Ad', 'themename' ),
'description' => __( 'This is a widget area that can be placed after the post', 'themename' ),
) );
These are the 3 most important options.
1. The “id” must be a unique ID and uses all lower case, no special characters, or spaces. You can use numbers.
2. The “name” is more flexible, you can use spaces and other characters. This identifies the sidebar in the dashboard.
3. The “description” is used in the dashboard to help describe where the widget area will be used.
You can register however many sidebars your theme will need using this function over and over. It is very important that each sidebar have a unique ID and to limit confusion, the NAME should also be different for each sidebar you make.
To display this widget area in your theme, you have two options. You can place the widget code directly in a template file such as home.php, where you wish to display the widget area.
genesis_widget_area( 'home-slider', array( 'before' => '<div id="home-slider" class="widget-area">' ) );
You can also display the widget area using a hook. This example adds the widget area after single posts.
add_action( 'genesis_after_post_content', 'my_widget_after_post' );
function my_widget_after_post() {
if ( ! is_singular( 'post' ) )
return;
genesis_widget_area( 'after-post-ad', array(
'before' => '<div class="after-post widget-area">',
) );
}
Note we used the same after-post-ad to call the correct widget area, and a conditional to show it on single posts only. You can change the hook and the conditional to have the widget area show up in different areas.
You will also need to add additional css, depending on widget placement.
See the WordPress codex for additional information on widgets.