How to Set Up Members Only Menu Items or Pages

WP-Members restricts selected WordPress content to be viewable by registered site members. It is a great tool if you wish to offer private content to your members.

You can restrict some of the content on the pages or the entire page from public viewing. Thus, only registered and logged in users on your site will see the hidden content. Some of you have or wish to have a private membership directory, so let's learn how to hide content using that as an example.

First, I create a table with a list of members, as an example of what needs to be hidden.


Then you have two options depending on what you wish to hide:
1) Hiding the whole page


(Don't forget to publish/update the page if it is already published)

As a result, instead of a hidden page, a login form and a registration form will be displayed.


The registration form can be disabled if needed (in case you don't want to allow manual
registration through the website) in the WP Members settings.


2) Hiding a part of a page (this may be helpful if you have a lot of content on a single page but
only a part of it needs to be restricted):

a) Using shortcode wpmem_form login, then everything between [wpmem_form login] and
[/wpmem_form] tags will be restricted, and a login form will appear on the page similar to above
without a registration form, even if it is enabled in the WP Members settings.


(Select this shortcode in the WP-Members Shortcodes list menu.)


(Paste content you want to hide between its open/closing tags.)

b) Using shortcode wpmem_logged_in, everything between the [wpmem_logged_in] and
[/wpmem_logged_in] tags will be restricted, but there will be no login form on the page, just
a blank space if user is not logged in.


In the menu of the list of WP-Members shortcodes, you can find even more shortcodes. For
example you can use login + redirect + content to redirect users after login to the target page.

You can customize the display of both the entire menu (1) and its menu items (pages) (2) separately for users who have logged in to your site and for non-logged/unregistered users.

1) In this case, you need to create two navigation menus. Some menu items (pages) may be the
same for both if you want to show them to both users who have logged in to the site and those
who have not logged in to the site.


For example you can show header menu with Home and Membership Directory only for the logged in users. Meanwhile logged out users will see only the home page in the different menu header menu public. See these screenshots to understand it clearly.



2. You can choose who to show (Logged In Users / Logged Out Users / All Users) particular
menu items (pages) in any already created menu.

For example, you can achieve what's described in point 1, where you create two different
menus (Header Menu and Header Menu Public) with the one single operation with the only one





Сategory Menu
Powered by Zendesk