[memb_login_form]

Description

Renders a login form on any page. Labels, redirect target, and template are configurable. When show="smart" (the default), the form is hidden for logged-in users, super admins instead see a red notice reminding them they are logged in.

Failed logins are surfaced inline: a ?login=failed query parameter renders an "Invalid username or password" error above the form.

The form includes a password visibility toggle (dashicon eye) powered by inline CSS/JS that loads only once per page.

Custom templates can be provided in the theme/plugin template stack as login_form_{template}; the internal wp_login_form()-based template is used as fallback.

When the SSO module is enabled with Button Visibility set to everywhere, provider sign-in buttons render below the submit button through this form's after_submit slot.

The HTML this shortcode renders comes from a template you can override in your theme. See Shortcode Templates.

Shortcode Examples

[memb_login_form]

Custom labels and redirect:

[memb_login_form username_label="Email Address:" password_label="Passcode:" redirect="/welcome/"]

Shortcode Parameters

username_label

Label for the username field. Default: 'Email:'.

password_label

Label for the password field. Default: 'Password:'.

redirect

URL to redirect to after login. Default: the value of ?redirect_to= if present, otherwise the admin URL.

show

Display mode. 'smart' (default) hides the form for logged-in users. Any other value always shows the form.

template

Template name used to locate a custom login_form_{template} template file. Falls back to internal when the template doesn't exist. Default: 'internal'.

Shortcode Attributes

Attribute Value
Conditional No
Nestable No
Accepts formatting No

Hooks

wpal/torii/login_form/slots (filter, empty array, attributes) adds custom slot HTML to the rendered form.