WordPress.org

Ready to get started?Download WordPress

Forums

How To Add A Widgetized Footer (5 posts)

  1. AndyShick
    Member
    Posted 3 years ago #

    I'm wondering how to add a widget-friendly footer to this to the site I'm currently working on.

    I've added the following code to Footer.php, as well as some CSS code to the stylesheet, but the functions.php and sidebar.php stuff confuses me. Not sure what to add to there.

    <div id="footer-sidebar" class="secondary">
       <div id="footer-sidebar1">
         <?php if ( !function_exists('dynamic_sidebar')
          || !dynamic_sidebar(3) ) : ?>
         <?php endif; ?>
       </div>
       <div id="footer-sidebar2">
         <?php if ( !function_exists('dynamic_sidebar')
          || !dynamic_sidebar(4) ) : ?>
         <?php endif; ?>
       </div>
       <div id="footer-sidebar3">
         <?php if ( !function_exists('dynamic_sidebar')
          || !dynamic_sidebar(5) ) : ?>
         <?php endif; ?>
       </div>
    </div> <!-- Close footer-sidebar -->
    <div style="clear-both"></div>

    I was following along this tutorial, but got confused along the way:
    http://www.sueblimely.com/add-widget-ready-sidebars-to-wordpress-footers/

    Any help will be greatly appreciated.

    Thanks!

  2. soulrider911
    Member
    Posted 3 years ago #

    Check this site, he goes over what you are trying to achieve, its kinda a two step process. You need to add some code to the functions.php file as well as enabling the "sidebars" in the different templates
    http://www.quickonlinetips.com/archives/2007/11/how-to-widget-enable-wordpress-themes-in-3-easy-steps/#comment-592692

    http://www.quickonlinetips.com/archives/2007/11/how-to-create-multiple-dynamic-sidebars-for-wordpress-widgets/

  3. AndyShick
    Member
    Posted 3 years ago #

    Thanks for the link. I probably should have specified that there is already a right sidebar in the theme I'm using (Codium Extend). I'm trying to add a 3-column footer.

    This is what's in functions.php already for the sidebar.

    register_sidebar(array(
    		'name' => 'SidebarTop',
    		'description' => 'Top sidebar',
    		'before_widget'  =>   "\n\t\t\t" . '<li id="%1$s" class="widget %2$s"><div class="widgetblock">',
    		'after_widget'   =>   "\n\t\t\t</div>\n",
    		'before_title'   =>   "\n\t\t\t\t". '<div class="widgettitleb"><h3 class="widgettitle">',
    		'after_title'    =>   "</h3></div>\n" .''
    		));
    
    		register_sidebar(array(
    		'name' => 'SidebarBottom',
    		'description' => 'Bottom sidebar',
    		'before_widget'  =>   "\n\t\t\t" . '<li id="%1$s" class="widget %2$s"><div class="widgetblock">',
    		'after_widget'   =>   "\n\t\t\t</div>\n",
    		'before_title'   =>   "\n\t\t\t\t". '<div class="widgettitleb"><h3 class="widgettitle">',
    		'after_title'    =>   "</h3></div>\n" .''
    		));
    
    	}

    Do you how I can just add an additional sidebar for the footer?

  4. AndyShick
    Member
    Posted 3 years ago #

    I figured it out. Thanks. I just had to register each footer individually.

  5. henri
    Member
    Posted 3 years ago #

    Could you mark this post as [resolved]? thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic