[resolved] Sidebar 2 show up in widget (4 posts)

  1. Smithdesign
    Posted 8 years ago #

    Okay! Here it comes.

    I'm using JustSkins template Twilight which I have modified. That template have only one sidebar. And I wanted two sidebars. I put in following code in index, page, single.php

    <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>

    Then I took existing sidebar and named it sidebar2 and made a duplicate of the CSS sidebars naming them sidebar2, because it should have a different look.

    Everything is working fine, showing up properly on the site exept for one thing. I want it to show up in admin under Design/widgets. But it doesn't. I can only choose that one sidebar.

    In sidebar2.php I changed to number 2 between (). I don't know if that does anything, since I'm not good at programming.

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

    I think I might forgot to put some output telling it to show up in admin interface. But I don't know where.

    I'll be very greatful if you guys help me out.


  2. Smithdesign
    Posted 8 years ago #

    Oh man!

    I just solve the problem myself. In functions.php i replaced following:

    if ( function_exists('register_sidebar') )
            'before_widget' => '<li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li>',
            'before_title' => '<h2 class="sidebartitle">',
            'after_title' => '</h2>',


    if ( function_exists('register_sidebars') )

    and added a number 2. Now it show up in admin. :-)

    Dancing "happy dance"

  3. Subuntu
    Posted 7 years ago #


    Id like to add i needed to put a <?php endif; ?> to display it without parse error.
    Here this is what my sidebar2.php looks like.
    And i added it to my footer.php ...

    <div id="sidebar2">
    		<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : ?>
    		<?php endif; ?>
  4. Jbert
    Posted 7 years ago #


    Please contact me at

    3jbert@tx.rr.com. I must talk to you about your addition----please


Topic Closed

This topic has been closed to new replies.

About this Topic