The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Password-protect form in nav-dropdown/modal? (2 posts)

  1. Justin Picard
    Posted 3 years ago #

    I have password-protected some pages. I would like the password-form (that normally opens in a new page) to appear in a dropdown when hovering over the page-link in the main navigation. Is this possible? And how? If not, the second option is to have it in a modal-window/fancybox (or any other modal).

  2. Jerry
    Posted 3 years ago #

    You would need to check if the post is password protected in the loop via the post global (example).

    Edit: You can use the post_password_required() function instead.

    If it is, you would use your own function to pop out the say, thickbox or so with a password form. For the form you can use the get_the_password_form()

    More info on functions related can be found here.

    Tho, I do believe you gave me a plugin idea XD

Topic Closed

This topic has been closed to new replies.

About this Topic