how does the footer.php get the footer widget information from functions.php?
-
hey everyone. i’m using twentyten and i’m making a child theme and i’m trying to figure out logically HOW the registered widget areas in functions.php are put into the footer.php area?
here’s the code (i think) for the widget’s in the footer in functions.php:
// Area 3, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'First Footer Widget Area', 'twentyten' ), 'id' => 'first-footer-widget-area', 'description' => __( 'The first footer widget area', 'twentyten' ), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); // Area 4, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'Second Footer Widget Area', 'twentyten' ), 'id' => 'second-footer-widget-area', 'description' => __( 'The second footer widget area', 'twentyten' ), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); // Area 5, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'Third Footer Widget Area', 'twentyten' ), 'id' => 'third-footer-widget-area', 'description' => __( 'The third footer widget area', 'twentyten' ), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); // Area 6, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'Fourth Footer Widget Area', 'twentyten' ), 'id' => 'fourth-footer-widget-area', 'description' => __( 'The fourth footer widget area', 'twentyten' ), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) );
and then in the footer.php, i think this is what calls of that?
<?php /* A sidebar in the footer? Yep. You can can customize * your footer with four columns of widgets. */ get_sidebar( 'footer' ); ?>
so where does it say in the above code that there is a sidebar called footer?
here’s the CSS for it also which is kinda confusing if anyone could touch on whati s happening here….
#footer-widget-area { overflow: hidden; } #footer-widget-area .widget-area { float: left; margin-right: 20px; width: 220px; } #footer-widget-area #fourth { margin-right: 0; } #site-info { float: left; font-size: 14px; font-weight: bold; width: 700px; } #site-generator { float: right; width: 220px; }
basically, i’m asking all these questions because i want the footer to be just ONE widget stretched across the bottom of the page and i need to do it in a child theme so i’m trying to understand what is happening here.
also, i want to create 3 new widget areas at the top of my page to put some information inside as well… so i need to understand how the heck these things work.
- The topic ‘how does the footer.php get the footer widget information from functions.php?’ is closed to new replies.