WordPress.org

Ready to get started?Download WordPress

Forums

Sidebar 2. How can I call this? (9 posts)

  1. kjagen
    Member
    Posted 5 years ago #

    I use iNove. I made sidebar 2.
    The code in the footer which call sidebar is

    </div>
    <!-- main END -->

    <?php get_sidebar(); ?>
    <div class="fixed"></div>
    </div>
    <!-- content END -->

    <?php include('templates/end.php'); ?>

    How can I call sidebar 2 for certain pages?

    And can I add widgets for only one sidebar?

  2. Doodlebee
    Member
    Posted 5 years ago #

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

  3. mg12
    Member
    Posted 5 years ago #

    <?php get_sidebar(); ?>

  4. Doodlebee
    Member
    Posted 5 years ago #

    mg - that's the call for the regular sidebar. He's wanting to know how to call in a *second* sidebar - different php file.

  5. kjagen
    Member
    Posted 5 years ago #

    Yes what`s the code going to be like

    or

    is it possible to get a second ( and 3,4) to show up in the dashboard, so you can add things the more than one sidebar?

  6. Doodlebee
    Member
    Posted 5 years ago #

  7. kjagen
    Member
    Posted 5 years ago #

    I tried changing it but ended up with an all white dashboard and site...uploaded the page again and back to normal,
    but still don`t now how to register sidebars.
    I use iNove, and all I get in the place where you choose which sidebar to add widgets to is, north, west, east and south. Is sidebar 2 supposed to show uo here if i do that function thing correct??

    Here are some function code

    /** widgets */
    if( function_exists('register_sidebar') ) {
    register_sidebar(array(
    'name' => 'north_sidebar',
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3>',
    'after_title' => '</h3>'
    ));
    register_sidebar(array(
    'name' => 'south_sidebar',
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3>',
    'after_title' => '</h3>'
    ));
    register_sidebar(array(
    'name' => 'west_sidebar',
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3>',
    'after_title' => '</h3>'
    ));
    register_sidebar(array(
    'name' => 'east_sidebar',
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3>',
    'after_title' => '</h3>'
    ));
    }

  8. Doodlebee
    Member
    Posted 5 years ago #

    I don't know "iNove". If you add the right funtion to your file, then yes, the sidebar 2 will show up in the widgets dropdown.

    If you got a blank white page, you had an error - probably a misplaced ; or something. Your error logs will tell you what you did wrong.

  9. Jack Yan
    Member
    Posted 4 years ago #

    Kjagen, I do not use Inove, but this page proved to be very useful to me:

    http://brolly.ca/blog/wordpress/add-multiple-wordpress-widget-sidebar/

    I didn’t have to bother with creating new sidebar.php files, and it worked exactly as “advertised” with our WordPress install.

Topic Closed

This topic has been closed to new replies.

About this Topic