Search code examples
wordpressdynamicwidgetsidebar

Multiple widgetized sidebars in wordpress


I have succesfuly created multiple wordpress widgetized sidebars with my functions.php file with the following code

<?php
    if(function_exists('register_sidebar')){
        register_sidebar(array('name' => 'mrskitson'));
        register_sidebar(array('name' => 'mrskitson2'));
    } 
?>

However When I try and include them in a page only the first one shows up even when I specify the second one by name. The code for that is below.

<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('mrskitson2') ) : ?>

Thanks for the help in advance.


Solution

  • if(function_exists('register_sidebar')){
            register_sidebar(array('name' => 'mrskitson','id' => 'mrskitson'));
            register_sidebar(array('name' => 'mrskitson2','id' => 'mrskitson2'));
        } 
    

    Try including an ID, I believe that is what it is keyed on.