Login/Logout [Pro]

Knowledgebase Docs » ShiftNav
USEFUL? 0

Since v1.5

These shortcodes are intended to work in tandem in the Toggle Bar. Most commonly these would be placed in the Toggle Content Right Edge setting

Login Link

[shiftnav_login_link]

The login link shortcode will only appear for logged-out users. Clicking it will redirect to the WordPress login page.

icon_class

The icon_class attribute lets you set a custom icon. By default this is set to fa fa-user. You could change it to a heart, for example, like this:

[shiftnav_login_link icon_class="fa fa-heart"]

login_url

The login_url attribute lets you set a custom login URL (the page where the login form is presented to the user)

[shiftnav_login_link login_url="http://mysite.com/custom-login"]

redirect

[shiftnav_login_link redirect="http://mysite.com/welcome"]

The redirect attribute allows you to determine where the user should be redirected to after successfully logging in.

Content

The shortcode content (optional) will be printed beside the icon. For example,

[shiftnav_login_link] Login[/shiftnav_login_link]

Logout Link

The logout link shortcode allows you to create a nonced logout link. It will only appear for logged in users.

[shiftnav_logout_link]

icon_class

The icon_class attribute lets you set a custom icon. By default this is set to fa fa-sign-out. You could change it to a user with an X, for example, like this:

[shiftnav_logout_link icon_class="fa fa-user-times"]

redirect

[shiftnav_logout_link redirect="http://mysite.com/goodbye"]

The redirect attribute allows you to determine where the user should be redirected to after logging out.

Content

The shortcode content (optional) will be printed beside the icon. For example,

[shiftnav_logout_link] Logout[/shiftnav_logout_link]