How to hide a page for logged out users

How to hide a page or a post

You may use the tool "Ultimate Member: Content Restriction" to restrict access to the page and lock it for logged-out users. Set these options:

  • Restrict access to this post?  - Turn it on
  • Who can access this post?  - Logged in users
  • What happens when users without access try to view the post?  - 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 in this way.

[Pages > Edit page]

Redirect back

Select the option Redirect user in the setting "What happens when users without access try to view the post?" 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 a higher priority than the user role setting "Action to be taken after login".

How to enable/disable the tool

The plugin allows you to disable/enable the tool "Ultimate Member: Content Restriction" 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 this option:

  • Who can see this menu link?  => "Logged In Users"

Note: You can limit menu item visibility by user roles.

[Appearance > Menus]