WordPress.org

Ready to get started?Download WordPress

Forums

different sidebars on password protected page (1 post)

  1. webwitch
    Member
    Posted 2 years ago #

    I have a password protected page without a sidebar on the login page. Once a user has logged in then the sidebar is revealed. The code I use for this in the page template is:
    <?php
    if ( !post_password_required() ) {
    include(TEMPLATEPATH . '/sidebar5.php');
    }
    ?>

    I would now like to modify this and display a different sidebar on the login page for some general info. I have tried adding to the above:
    else
    {
    include(TEMPLATEPATH . '/sidebar-password.php');
    }

    Nothing happens though. It still works but the login page still doesn't show the alternate sidebar.

    Any ideas? Thanks in advance.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.