It’s easy to use the login from anywhere on your website by simply adding the


shortcode. Most of the time it doesn’t require any additional effort to make it nice, but you can still customize it through custom CSS.


  • Form target URL can be controlled with magic_login_shortcode_form_action hook
  • Specific redirected address with redirect_to attribute in shortcode

Use it in custom Template

<?php echo do_shortcode( '[magic_login_form redirect_to=""]' ); ?>

Display for logged-in users

By default, the shortcode does not produce any output if the user is logged in. This makes it convenient to use on pages intended for logged-in users, like “my-account” pages. However, this default behavior can be altered using the hide_logged_in attribute. Setting hide_logged_in=”false” allows the shortcode to be displayed regardless of the user’s login status.

[magic_login_form hide_logged_in="false"]