Forums

[resolved] Multiple sidebar issue. (2 posts)

  1. Robodashy
    Member
    Posted 5 months ago #

    Hi all.

    I've gone through the forums thoroughly to find the answer to my problem, and what I thought solved the issue - did not.
    I am trying to have 2 widgetized sidebars, but only 1 is working. I'm doing the theme design for http://www.artofdeduction.com/ so please have a look at the code there also.

    But basically my functions.php looks like this:

    <?php
    if ( function_exists('register_sidebar') )
    register_sidebar(array('name'=>'sidebar1',
    'before_widget' => '<div id="%1$s" class="side-c %2$s">', // Removes <li>
    'after_widget' => '</div>', // Removes </li>
    'before_title' => '<h3>', // Replaces <h2>
    'after_title' => '</h3>', // Replaces </h2>
    ));
    register_sidebar(array('name'=>'sidebar2',
    'before_widget' => '<div id="%1$s" class="side-c %2$s">', // Removes <li>
    'after_widget' => '</div>', // Removes </li>
    'before_title' => '<h3>', // Replaces <h2>
    'after_title' => '</h3>', // Replaces </h2>
    )); ?>

    and my sidebar1.php and sidebar2.php look like this:
    '

      <?php if ( !function_exists('dynamic_sidebar')
      || !dynamic_sidebar('sidebar1') ) : ?>
      <?php endif; ?>
    ' and
    '
      <?php if ( !function_exists('dynamic_sidebar')
      || !dynamic_sidebar('sidebar2') ) : ?>
      <?php endif; ?>
    '

    From a previous post on the forums I found - this should have worked, but still I am only able to get viewable widgets on one sidebar.

    All help is muchly appreciated.

  2. Robodashy
    Member
    Posted 5 months ago #

    I apologise for the poorly formatted first post. It's 1am, I'm going to bed.

Reply

You must log in to post.

About this Topic