The Login-out block allows you to automatically add a link anywhere on your site which lets your site users login and/or logout if they are already logged in.
How to add the Login-out block
There are two ways you can use to add a Login-out block once you add a Navigation block:
- From the sidebar
- By typing forward slash (/)
From the sidebar
Click on the (+) icon in the sidebar, and either select the Login-out link block from the list of your recently used blocks or click on Browse all to show all the available blocks and select it from there.
![login-out block by the sidebar](https://wordpress.org/documentation/files/2023/12/browse-all-1.gif)
By typing back slash (/)
Type back slash (/) on your keyboard and then start typing login. You should notice a small popup with suggestions. Select the Login/out block option from the popup itself.
![login-out block by typing back slash](https://wordpress.org/documentation/files/2023/12/login-out-block-1.gif)
Refer to this article for detailed instructions on adding blocks.
Block toolbar
Each block has its own toolbar, which contains unique controls that let you customize or configure the block. The Login/out block has the following options on its toolbar:
![login-out block toolbar](https://wordpress.org/documentation/files/2023/12/image-5.png)
Block moving tools
![login-out block toolbar highlighting the drag tool](https://wordpress.org/documentation/files/2023/12/login-out-block-drag-n-drop-option.png)
You can reorder Login/out block on the page. Use the toolbar to move the items top and bottom or drag them to the line above or to the line below.
More options
The Options section opens block settings to update it. You can also copy, duplicate, lock, or remove your Login/out.
Details about More options can be found in this support article.
Block settings
Each link has its Block settings you can access by clicking the settings button on the upper-right corner of the editor or via Options in the toolbar.
Settings
There are 2 options under settings for the login/out block.
- Display login as form.
- This setting displays the login form instead of just showing the login link.
- The logout link stays unchanged with this setting.
- Redirect to current URL.
- When this setting is enabled, the user after successful login lands to the previous URL he was trying to access before login.
Typography
The Login/out block provides typography settings to change the font family, appearance, line height, letter spacing, decoration, letter case, and font size.
For details refer to this support article: Typography settings overview
Advanced
The Advanced section has the Additional CSS classes(es) option. You can integrate your custom style into a Login/out block by inserting your CSS Class name into this field.
Changelog
- Created 2023-12-16
Was this article helpful? How could it be improved?
Log in to submit feedback. If you need support with something that wasn't covered by this article, please post your question in the support forums.