WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Broken Dynamic Sidebar

[Resolved] Broken Dynamic Sidebar

  • Hi,

    I am trying to add three widgetized sidebar divs. The code looks like this:

    <div id="sidebar">
    
        <div id="l_sidebar">
        <ul>
        <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?>
        <?php endif; ?>
        </ul>
        </div>
    
        <div id="m_sidebar">
        <ul>
        <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : ?>
        <?php endif; ?>
        </ul>
        </div>
    
        <div id="r_sidebar">
        <ul>
        <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(3) ) : ?>
        <?php endif; ?>
        </ul>
        </div>
    
    </div>

    As you can see these are all setup the exact same way, but when in WP I only get options for Sidebar 1 and 2. If I change the ‘2’ and ‘3’ in the code, Sidebar 2 will show up in div#r_sidebar.

    I am totally stumped, anyone have any ideas? Is there another setting somewhere else that is limiting the number of sidebars I can use?

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Have you created your functions.php in the theme folder? If not, you’ll need to

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebars(3);
    ?>

    That should work

    Oh Ladycrow. I weep for happiness over the help you have provided. Thank you so much.

    Ladycrow,

    Thanks again for your help with this.

    Soon after I implemented this in my Sandbox theme would no longer load when I added www. to the beginning of my URL. I finally traced it back to this code.

    Not sure why that happened at all, but if you are using the Sandbox theme and want to change the number of sidebars, you can change this code on line 437

    // Table for how many? Two? This way, please.
    	register_sidebars( 3, $p );

    Hopefully that will help someone, sometime.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Broken Dynamic Sidebar’ is closed to new replies.
Skip to toolbar