Support » Fixing WordPress » Help with formatting functions.php for dynamic sidebar

  • Resolved ashleymurphy



    I’ve tried to create dynamic sidebars so that my client can edit them through the widgets panel. Here is the code I’m using in my functions.php. It is supposed to create three separate dynamic sidebars.

    register_sidebar(array(‘name’ => ‘Process Sidebar’));
    register_sidebar(array(‘name’=>’Contact Sidebar’));
    register_sidebar(array(‘name’=>’Services Sidebar’));

    And here is what I am using in the sidebar-services.php for example

    <div id=”rightCol-custom”>

      <?php if ( !function_exists(‘dynamic_sidebar’)
      || !dynamic_sidebar(‘Services Sidebar’) ) : ?>
      <?php endif; ?>

    <!– end of left sidebar–>

    My problem is this: When I just have the first two sidebars in the functions.php it works but when I add the function for the third sidebar “Services” then the whole site crashes and comes up blank. Any ideas why?


Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator keesiemeijer



    try it with this:

    register_sidebar(array('name' => 'Process Sidebar'));
    register_sidebar(array('name'=>'Contact Sidebar'));
    register_sidebar(array('name'=>'Services Sidebar'));

    Thank you! This worked perfectly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help with formatting functions.php for dynamic sidebar’ is closed to new replies.