WordPress.org

Support

Support » Plugins and Hacks » Hacks » Password-protect form in nav-dropdown/modal?

Password-protect form in nav-dropdown/modal?

  • 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).

Viewing 1 replies (of 1 total)
  • 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

Viewing 1 replies (of 1 total)
  • The topic ‘Password-protect form in nav-dropdown/modal?’ is closed to new replies.