[docy_login_form] shortcode

Estimated reading: 2 minutes 339 views

Summary: The [docy_login_form] shortcode allows you to display a simple and customizable sign-in form anywhere on your site. You can use it inside pages, posts, or Elementor shortcode widgets.

⚠️ Important: The Docy Core plugin must be active for this shortcode to work.

[docy_login_form]

This will output the default login form with standard labels and behavior.

Available Attributes

You can customize the login form using the following attributes:

AttributeDescription
redirectURL to redirect the user after successful login.
submit_labelText for the submit button. Default: Sign in.
username_labelLabel for the username field. Default: Username.
password_labelLabel for the password field. Default: Password.
username_placeholderPlaceholder text for the username field. Default: Enter your username.
password_placeholderPlaceholder text for the password field. Default: Enter your password.
signup_linkURL for the sign-up page. Leave empty if no sign-up link is needed.
button_positionPosition of the submit button. Options: left, center, right. Default: left.
button_colorBackground color of the submit button. Default: #1e73be.
button_text_color
Text color of the submit button. Default: #ffffff.
error_noticeCustom error message shown on login failure. Default: Invalid username or password. Please try again.

Example

[docy_login_form 
    redirect="https://example.com/dashboard" 
    submit_label="Login Now"
    username_label="Your Username" 
    password_label="Your Password"
    username_placeholder="Type your username"
    password_placeholder="Type your password"
    button_color="#ff5722"
    button_text_color="#ffffff"
    button_position="center"
    signup_link="https://example.com/signup"
    error_notice="Oops! Wrong credentials."
]

This will render a login form that redirects users to /dashboard after login, and shows custom labels and error messages.

Leave a Reply

Your email address will not be published. Required fields are marked *

Share this Doc

[docy_login_form] shortcode

Or copy link

CONTENTS