• Resolved Robodashy

    (@robodashy)


    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 https://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.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Multiple sidebar issue.’ is closed to new replies.