I'm trying to add another widget area to the header. This one I want to go into the "access" area
I was successful in adding the first one with this bit of code
// This will create your widget area
function my_widgets_init() {
register_sidebar(array(
'name' => 'Header Aside',
'id' => 'header-aside',
'before_widget' => '<li id="%1$s" class="widgetcontainer %2$s">',
'after_widget' => "",
'before_title' => "<h3 class=\"widgettitle\">",
'after_title' => "</h3>\n",
));
}
add_action( 'init', 'my_widgets_init' );
// adding the widget area to your child theme
function my_header_widgets() {
if ( function_exists('dynamic_sidebar') && is_sidebar_active('header-aside') ) {
echo '<div id="header-aside" class="aside">'. "\n" . '<ul class="xoxo">' . "\n";
dynamic_sidebar('header-aside');
echo '' . "\n" . '</div><!-- #header-aside .aside -->'. "\n";
}
}
add_action('thematic_header', 'my_header_widgets', 8);
I am now trying to add a second one. I have gotten to the point where I can add widgets to the area in the admin area but no dice on the actual site.
here is the code I am using:
// This will create your widget area
function my_stuff_init() {
register_sidebar(array(
'name' => 'Header Aside2',
'id' => 'header-aside2',
'before_widget' => '<li id="%1$s" class="widgetcontainer %2$s">',
'after_widget' => "",
'before_title' => "<h3 class=\"widgettitle\">",
'after_title' => "</h3>\n",
));
}
add_action( 'init', 'my_stuff_init' );
// adding the widget area to your child theme
function my_access_widgets() {
if ( function_exists('dynamic_sidebar') && is_sidebar_active('header-aside2') ) {
echo '<div id="header-aside2" class="aside">'. "\n" . '<ul class="xoxo">' . "\n";
dynamic_sidebar('header-aside2');
echo '' . "\n" . '</div><!-- #header-aside2 .aside -->'. "\n";
}
}
add_action('thematic_access', 'my_access_widgets', 9);
Here is the address to the site http://64.79.143.234/clinicient/wordpress/
Thanks in advance for any help!