I am trying to add extra widget areas to the Thematic theme and have SORT OF managed to do it...
I have added one to the right hand side of the header, and an extra Aside (_belowmainasides) in the sidebar.
The problem is the extra Aside in the sidebar is being pushed to the bottom, level with the bottom of the main content area, leaving a big empty space between the bottom of the second aside and this new 3rd one.
Have a look at http://jamestowers.com to see what i mean - under the "newsletter" section(there's a screenshot of the problem here for those who see this after the problem has been resolved http://jamestowers.com/thematicproblem.html).
i have a feeling it has something to do with the child function.php below but i'm fairly new to php so obviously not too sure...
Any ideas?
<?php
// This will create your header Aside widget area
function my_widgets_head() {
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_head' );
////////////////////////////////////////
// This will create tertiary Aside widget area
function my_widgets_init() {
register_sidebar(array(
'name' => 'Tertiary Aside',
'id' => 'tertiary Aside',
'before_widget' => '<li id="%1$s" class="widgetcontainer %2$s">',
'after_widget' => "\n",
'before_title' => "<h3 class=\"widgettitle\">",
'after_title' => "</h3>\n",
));
}
add_action( 'init', 'my_widgets_init');
////////////////////////////////////
// adding the Header Aside 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', 4);
/////////////////////////////////////////
// adding the Tertiary Aside widget area to your child theme
function my_sidebar_widgets() {
if ( function_exists('dynamic_sidebar') && is_sidebar_active('tertiary Aside') ) {
echo '<div id="tertiary" class="aside">'. "\n" . '<ul class="xoxo">' . "\n";
dynamic_sidebar('tertiary Aside');
echo '' . "\n" . ''. "\n";
echo '' . "\n" . '</div><!-- #tertiary .aside -->'. "\n";
}
}
add_action('thematic_belowmainasides', 'my_sidebar_widgets', 0);
?>