Custom sidebar (3 posts)

  1. gddik
    Posted 4 years ago #

    I want to be able to have a text widget that appears in my sidebar on only one specific page, but I can't seem to be able to do it.

    I am using the "Admired" theme which has options for two and three column displays, with two separate sidebar areas - "Main Sidebar" and "Second Sidebar".

    I hoped that putting the widget into the "Second Sidebar" area and using the three-column display for the chosen page, and the two-column display for all other pages would do it. It does what I want for the chosen page, but on the other pages, it displays the "Main Sidebar" with the "Second Sidebar" below it.

    Any suggestions, please?

    Thanks in advance


  2. johnfotios
    Posted 4 years ago #

    <?php if ( is_page(N) ) : ?>
    <?php get_sidebar('sidebar_1'); ?>
    <?php else: ?>
    <?php get_sidebar('sidebar_2'); ?>
    <?php endif; ?>

    Kind of thing ... ?

  3. gddik
    Posted 4 years ago #

    Thanks John - I'm not a PHP person, or a coder - where would that code go, exactly?

    - Graham

Topic Closed

This topic has been closed to new replies.

About this Topic