WordPress.org

Ready to get started?Download WordPress

Forums

Password Protected Page Custom Template help needed! (2 posts)

  1. Rick Lamers
    Member
    Posted 4 years ago #

    Hi guys, I have a very simple question:

    I made a custom template for a page to query a certain category of posts but I want that certain page to be password protected. But the wordpress function of password protection seems to be working only on default template...

    Any thoughts? Ty!

  2. racer x
    Member
    Posted 4 years ago #

    You can use:

    if (is_user_logged_in()) { ?>
    do stuff
    } ?>

    or on the right hand side in the "Publish" area is an option for:
    Visibility: Public (edit)

    You can select password protected there.

Topic Closed

This topic has been closed to new replies.

About this Topic