• Resolved elianora

    (@elianora)


    Hi
    On my blog there is two important pages and of course lots of posts.
    Now I’m trying to find a way to show own sidebars for both of pages and still have own for posts.

    On functions.php there is following lines.
    <?php
    // register widgetized sidebars
    if (function_exists(‘register_sidebar’)) {
    register_sidebar(array(‘name’ => ‘Left Sidebar’, ‘before_widget’ => ‘<div id=”%1$s” class=”%2$s”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<h4>’, ‘after_title’ => ‘</h4>’, ));
    register_sidebar(array(‘name’ => ‘Right Sidebar’, ‘before_widget’ => ‘<div id=”%1$s” class=”%2$s”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<h4>’, ‘after_title’ => ‘</h4>’, ));
    }

    And on foother.php
    footer.php
    <?php get_sidebar(); ?>

    And my sidebar.php includes
    <div id=”sidebar”>
    <div id=”sidebar-left”>
    <h4><?php _e(‘Categories’); ?></h4>

      <?php wp_list_cats(‘sort_column=name’); ?>

    <?php endif; ?>
    </div>

    <div id=”sidebar-right”>
    <?php if ( function_exists(‘dynamic_sidebar’) && dynamic_sidebar(2) ) : else : ?>
    <h4><?php _e(‘Tags’); ?></h4>

      <?php wp_tag_cloud(”); ?>

    <?php endif; ?>
    </div>

    So I’m so happy if someone could say what should I do to show own sidebars for every pages?

    I read this manual but unfortunately I didn’t understand.
    http://codex.wordpress.org/Customizing_Your_Sidebar#New_way_of_adding_sidebars

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Own sidebars for pages’ is closed to new replies.