Viewing 2 replies - 1 through 2 (of 2 total)
  • well, if you registered the sidebar properly in functions.php you can use it like this…. create the new sidebar file and name it sidebar-something.php

    Example:
    here’s the code from my functions.php

    if ( function_exists('register_sidebar') )
         register_sidebar(array(
           'name'=>'Sidebar',
           'before_widget' => '<li class="widget" id="%1$s"><div class="widgetBG">',
           'after_widget' => '</div><div class="widgetBottom"></div></li>',
           'before_title' => '<div class="widgetTitle">',
           'after_title' => '</div>',
          ));
         register_sidebar(array(
           'name'=>'TopWidget',
           'before_widget' => '<li class="topWidget" id="%1$s"><div class="topWidgetBG">',
           'after_widget' => '</div><div class="topWidgetBottom"></div></li>',
           'before_title' => '<div class="topWidgetTitle"><span class="topText">',
           'after_title' => '</span></div>',
          ));

    this creates 2 sidebars…. one named Sidebar, and one named TopWidget (don’t get confused by the before/after widget and before/after title, that’s formatting stuff that I use)

    After that, I created two files… one was just the standard sidebar.php, and one was named sidebar-topWidget.php

    now, I have registered 2 sidebars, and I have created them. To call them I do this:

    <?php get_sidebar(); ?> calls the normal sidebar, the one named sidebar.php, I’m pretty sure this is how kubrick calls the standard sidebar

    to use my second sidebar, I call this:
    <?php get_sidebar ('topWidget'); ?> this calls up the second sidebar, which in my case was named sidebar-topWidget.php

    Thread Starter blogtorres

    (@blogtorres)

    will i be putting this code in sidebar-topWidget.php

    <div>
    <ul>
    <?php if ( function_exists('dynamic_sidebar') && ('dynamic_topWidget' ) : else : ?>
    <?php endif; ?>
    </ul>
    </div>

    or am i just totaly wrong here?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Kubrick 1.5 sidebar’ is closed to new replies.