Adding A Login/Logout Link

The Total theme includes a built-in shortcode for creating a login/logout link which you can add anywhere on your site (including certain options in the Theme Customizer such as the Topbar content field). Here is the very basic way of adding the shortcode to your site:

[wp_login_url text="Login" logout_text="Logout"]

And here are the accepted parameters:

  • login_url – By default it will go to the WordPress login url but you can use this parameter to define a custom url
  • url – The same as login_url (just a fallback)
  • text – Text for non-logged in users
  • logout_text – Text for logged in users
  • target – Set to “blank” to open the login URL to open in a new tab/window
  • logout_redirect – Set a custom redirection for users after they logout