Skip to content

Login and Registration for Visitors

When you use the built-in option on the Visitor Restrictions tab, the plugin shows its own login and registration form on restricted content.

Choose Use built-in form as the “What Visitors See Instead” option. On a locked page, the visitor sees your restriction message (edited with the rich-text editor) followed by the login form. The message defaults to a friendly members-only note if you leave it empty, and it can be changed with the blpro_default_locked_message filter.

You can also place the form anywhere with a shortcode:

[blpro_login_form]
  • Both login and registration submit over AJAX. On success the member is logged in and the page reloads or redirects.
  • Registration requires a username, email, and password, validates the email format, and rejects usernames or emails that already exist, then signs the new user in automatically.
  • If reCAPTCHA for BuddyPress is active, the form advertises reCAPTCHA support.

The visitor-facing endpoints are blpro_login and blpro_register. They are open to logged-out users by design and are protected by a nonce rather than a capability check. See Options and AJAX.

Choose 3rd party plugin shortcode and paste a login-form shortcode from another plugin. The plugin renders that shortcode in place of its own form, so you can reuse an existing login experience.

Choose Redirect to a page and pick a destination page. Visitors who hit restricted content, and members who log out, are sent to that page.

These filters let you change the response text:

  • bplock_login_success_message
  • bplock_login_failed_message
  • bplock_register_success_message
  • bplock_register_user_already_exists_message