• I have a couple of password protected pages and I’d also like to protect the sidebar too. I have made a custom template so would like to password protect it so that the sidebar only shows when the person has entered the page.

    I have looked around for an answer but can’t find anything. Anyone have any ideas? thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter webwitch

    (@webwitch)

    Didn’t get any replies to this question alas but if anyone else is stumped by this I hunted around and added this code to the bottom of my custom template

    <?php
    if ( !post_password_required() ) {
    include(TEMPLATEPATH . ‘/sidebar5.php’);
    }
    ?>

    And it works!!!

    Thanks, that solved my need, too!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘password protect a template’ is closed to new replies.