Using the Shortcode

Theme My Login provides a single shortcode for your convenience.

Usage

The shortcode, in it's most simple form, is [theme-my-login]. This will display the login form, unless you are currently viewing a TML page, in which case, it will display the form for the current action.

Attributes

The shortcode accepts a few attributes. Explanation of them can be found below.

action

The action attribute defines which action the shortcode will display. If no action is defined, the login form will be shown, unless you are currently viewing a TML page, in which case, it will display the form for the current action. By default, available values are as follows:

  • login
    This will display the login form.
  • register
    This will display the registration form.
  • lostpassword
    This will display the first step in the password recovery process, where the user enters their email address and is sent a verification link.
  • resetpass
    This will display the second step in the password recovery process, which should only be accessed with a key from the lostpassword action.

Note that other actions may be added by plugins, themes or custom code.

show_links

The show_links attribute determines whether the links to other actions will be displayed below the form or not. To disable the links, simply pass "0" for this attribute. For example, [theme-my-login show_links="0"]. The default value is "1", where the links are shown.