Add sidebar to Twentyeleven child theme
I wanted to add a fourth footer sidebar and I’ve added the following to the functions.php file
register_sidebar( array( 'name' => __( 'Footer Area Four', 'twentyeleven' ), 'id' => 'sidebar-6', 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) );
I’ve also added the following code inside the function twentyeleven_footer_sidebar_class()
if ( is_active_sidebar( 'sidebar-6' ) ) $count++;
case '4': $class = 'four'; break;
I can see the fourth footer area in the widgets area and I would say that the system is recognising it as it changes the style of the footer’s widgets (“four”). But the fourth footer sidebar is not showing.
- The topic ‘Add sidebar to Twentyeleven child theme’ is closed to new replies.