How to hide a page for logged out users
How to hide a page or a post
You may use the tool "UM Content Restriction" to restrict access to the page and lock it for logged out users. Set these options:
- Restrict access to this content? - Turn it on
- Who can access this content? - Logged in users
- What happens when users without access tries to view the content? - Redirect user
- Where should users be redirected to? - Login page
Note: You can limit page (or post) access by user roles.
Exception: Login, Registration, Password Reset have special restriction logic and can not be restricted by the tool "UM Content Restriction".
[Pages > Edit page]
Select the option Redirect user in the setting "What happens when users without access tries to view the content?" and select the option Login page in the setting "Where should users be redirected to?". In this case the browser saves the previous restricted page in the URL parameter redirect_to and redirects to this page after login. The parameter redirect_to has higher priority then user role setting "Action to be taken after login".
How to enable/disable the tool
The plugin allows you to disable/enable the "UM Content Restriction" tool for each post type and taxonomy type.
[Ultimate Member > Settings > Access > Restriction Content]
How to hide a menu item
You may use the tool "Ultimate Member Menu Settings" to hide a menu item for logged out users. Set these option:
- Who can see this menu link? => "Logged In Users"
Note: You can limit menu item visibility by user roles.
[Appearance > Menus]