How to add a fourth footer widget area to twenty eleven
-
I’m using a child theme of twentyeleven. I used the code in alchymyth’s post (BELOW) and the sidebar-footer.php code from pastebin. The fourth footer are shows up in my dashboard and I can add content to it but the new style isn’t being picked up. The widget areas are still using the width from #supplementary.three .widget-area so the fourth area wraps. If I change the width in #supplementary.three .widget-area in twentyeleven style.css to 22.18% the four widget areas are displayed across in one line correctly.
I tried adding the style for the fourth widget area to the twentyeleven style.php but that style isn’t recognized; the width is still 30.85% as is used in the three widget areas.
Any help will be much appreciated.This was posted by alchymyth in this post: https://www.ads-software.com/support/topic/twenty-eleven-footer-alterations-functions-or-footer-css?replies=8
additional widget column in Twenty Eleven child theme footer:
(I had the code already in my test blogs)
in functions.php of the child theme://add a fourth footer widget area//
add_action( ‘widgets_init’, ‘register_fourth_footer_widgets’, 20 );
function register_fourth_footer_widgets() {
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>’,
) );
}some extra sections in sidebar-footer.php:
the new full file:
https://pastebin.com/aGsS7UrTaddition to style.css of the child theme:
/* Four Footer Widget Areas */
#supplementary.four .widget-area {
float: left;
margin-right: 3.7%;
width: 22.18%;
}
#supplementary.four .widget-area + .widget-area + .widget-area + .widget-area {
margin-right: 0;
}I’m using a child theme of twentyeleven. I used the code in alchymyth’s post (above) and the sidebar-footer.php code from pastebin. The fourth footer are shows up in my dashboard and I can add content to it but the new style isn’t being picked up. The widget areas are still using the width from #supplementary.three .widget-area so the fourth area wraps. If I change the width in #supplementary.three .widget-area in twentyeleven style.css to 22.18% the four widget areas are displayed across in one line correctly.
I tried adding the style for the fourth widget area to the twentyeleven style.php but that style isn’t recognized; the width is still 30.85% as is used in the three widget areas.
Any help will be much appreciated.
- The topic ‘How to add a fourth footer widget area to twenty eleven’ is closed to new replies.