Skip to content

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:

ParameterDescription
urlBy default it will go to the WordPress login url but you can use this parameter to define a custom url.
textText for non-logged in users.
logout_textText for logged in users.
logout_redirectSet a custom redirection for users after they logout.
targetSet to “blank” to open the login URL to open in a new tab/window.
iconThe icon to display next to the text, should be the name of a theme icon
icon_logged_inAlternative icon to display when the user is logged in.
Back To Top