How to create a second dynamic sidebar (2 posts)

  1. doodlz
    Posted 8 years ago #

    I'd like to add a second dynamic sidebar. I've read a few posts and am stuck on where to add the following to the functions.php file: <?php if ( function_exists('register_sidebars') ) register_sidebars(2);?>.

    It seems the section where I would place that code (at the top of the functions.php file) has an array with widget statements, and so I'm not sure how to add the register_sidebars(2) to that piece of code.

    I'm not a programmer, so I'm sorry if this is a dumb question.


  2. Steven Kolstad
    Posted 7 years ago #

    All anyone would have to do is forget about the array. Those parameters should be taken care of with your style-sheet. Copy and paste the above tag into your functions.php file-don't have one then you'll need to make one. <?php if (function_exists ('register_sidebars') ) register_sidebars(2); ?> -- Then go to a sidebar.php file and copy this in -- <?php if ( !function_exists('dynamic_sidebar')
    || !dynamic_sidebar() ) : ?>
    <?php endif; ?> -- If you have more than one sidebar, then copy this into each file and place a 1-into one file & a 2-into the other, into the last set of parenthesis -- !dynamic_sidebar(1) ) : ?> -- !dynamic_sidebar(2) ) : ?> -- Remember that placement of the code into the sidebar file will dictate where your widgets start appearing and will nullify anything in the code underneath this piece of code.

Topic Closed

This topic has been closed to new replies.

About this Topic