Guard Dog can render a WordPress login form on any normal page. This is useful for membership sites, block themes, account portals, or client-facing pages where sending people to the native wp-login.php screen feels a little too WordPress-y.
Use this when you want an embedded public login experience. If you want to style the native WordPress login screen, password reset screens, custom login URL, or 2FA challenge screen, use Login Screen Customization instead.
What It Does
The frontend login form supports:
- Username or email login
- Password login
- Remember me checkbox
- Lost password link
- CAPTCHA when CAPTCHA is enabled
- Passkey sign-in when Passkeys are enabled
- Social login buttons when Social Login is enabled and a provider is configured
- Redirects after successful login
- Block editor controls for block-based themes
The form uses WordPress authentication under the hood, so Guard Dog protections still apply. Login attempt limiting, CAPTCHA, access control, password expiration, and 2FA continue to run as part of the login flow.
Shortcode
Place this shortcode on any public page:
[guard_dog_login_form]
Common examples:
[guard_dog_login_form redirect_to="/account/"]
[guard_dog_login_form style="compact" show_social_login="false" max_width="420"]
[guard_dog_login_form show_passkey="true" show_remember_me="false" show_lost_password="true"]
Block
In the block editor, add the Guard Dog Login Form block.
The block includes controls for:
- Style:
default,minimal, orcompact - Redirect target
- Max width
- Passkey button visibility
- Social login button visibility
- Remember me visibility
- Lost password link visibility
The block renders dynamically on the frontend. In the editor, you will see a placeholder with the selected options.
Attributes
| Attribute | Default | Description |
|---|---|---|
style |
Site default | default, minimal, or compact. |
redirect_to |
Empty | URL to send users to after successful login. |
show_passkey |
Site default | Shows passkey sign-in when Passkeys are enabled. |
show_social_login |
Site default | Shows social login buttons when Social Login is enabled and configured. |
show_remember_me |
Site default | Shows the remember me checkbox. |
show_lost_password |
Site default | Shows the lost password link. |
max_width |
Site default | Optional form width in pixels. Allowed range is 280 to 960. |
Boolean attributes accept values like true, false, 1, 0, yes, and no.
Default Settings
Administrators can set defaults in Guard Dog -> Authentication -> Frontend Login Form.
Defaults apply to new shortcode and block instances unless that instance sets its own attribute. For example, if the default form includes social login, this one instance can still hide it:
[guard_dog_login_form show_social_login="false"]
Recommended Page Setup
- Create a page such as
/login/or/account/login/. - Add the Guard Dog Login Form block or shortcode.
- Set
redirect_toto the member/account area when appropriate. - Test in a private browser window.
- If using passkeys or social login, test those buttons separately.
- If using CAPTCHA, confirm the CAPTCHA appears or verifies invisibly depending on your provider.
How It Works With Other Features
Custom Login URL
The frontend login form can live on any page, even if your native WordPress login URL is hidden behind a custom slug. Your custom login URL still protects direct access to wp-login.php.
CAPTCHA
If CAPTCHA is enabled for login, the frontend form renders the CAPTCHA challenge and validates it during submission.
Two-Factor Authentication
Users who require 2FA will continue into the Guard Dog 2FA challenge after entering their username and password.
Passkeys
When show_passkey is enabled, the passkey button only appears if Passkeys are globally enabled. The button can use the username/email field on the same form.
Social Login
When show_social_login is enabled, buttons only appear when Social Login is enabled and at least one provider is fully configured.
Troubleshooting
The form does not appear
Check that the shortcode is typed exactly as [guard_dog_login_form], or that the Guard Dog Login Form block is present. If a page builder strips shortcodes, use the block or a shortcode-capable widget.
Passkey button is missing
Make sure Passkeys are enabled in Guard Dog -> Authentication -> Passkeys. Also confirm the form instance has show_passkey="true" or that the default setting is enabled.
Social login buttons are missing
Make sure Social Login is enabled, at least one provider is enabled, and that provider has all required credentials. See Social Login.
Users return to the wrong page
Set redirect_to on the shortcode or block. Guard Dog validates redirects for safety, so external or invalid destinations may be replaced with a safe local fallback.
I want to customize wp-login.php instead
Use Login Screen Customization. The frontend login form controls embedded page forms; the login screen customizer controls the native WordPress login flow.
← Custom Login URLs | Documentation Home | Frontend Account Security →