Skip to content
GPLWP Guides

How to control membership-based menu visibility on WordPress

Membership & LMS Time About 30 minutes 7 steps Updated 10 Oct 2026

MEMBERSHIP & LMS
The short answer

WordPress does not include built-in menu rules for membership levels. You can manually swap separate menus with theme code, which is fine for simple logged-in or logged-out navigation, but level-based visibility needs membership-plugin integration. The fast route is to use Paid Memberships Pro with its Nav Menus Add On.

The route
  1. 01Map the visibility rules
  2. 02Create each required menu
  3. 03Use the manual route carefully
  4. 04Choose the implementation
  5. 05Set up level-specific menus
  6. 06Handle block themes separately
  7. 07Test every menu state

What you need

  • A WordPress membership system with defined user levels
  • Administrator access to WordPress
  • A separate test account for each important membership state
  • A theme that supports the menu location or Navigation block

Map the visibility rules

Write down which links should appear for visitors, logged-in non-members and each membership level. Keep the rules simple where possible: for example, public links for everyone, account links for logged-in users and course links for active members.

Menu visibility is only navigation. It does not protect the linked page from a direct URL. Restrict the destination pages or lessons separately using your membership system, then use the menu rules to make the navigation clearer.

Create each required menu

For classic or hybrid themes, go to Appearance > Menus, create a menu for each audience and add the appropriate pages or custom links. Typical menus include Public, Logged-in, Free Member, and Paid Member.

If you use a block theme, create the menus and place them with the Site Editor's Navigation block. The exact menu screen can vary by theme, so check whether your header, footer and mobile navigation use separate menu locations.

Use the manual route carefully

For simple logged-in versus logged-out navigation, the manual route can be fine: register separate menu locations in a child theme and use conditional PHP to output the appropriate menu. WordPress documents separate menu output with wp_nav_menu(), and its developer documentation includes a logged-in versus logged-out example.

The drawback is that WordPress core does not know your membership levels. Level-specific rules require your membership plugin's API or a custom integration. Editing a parent theme can also erase changes during an update, and custom code can miss a footer, mobile menu or page-builder header.

Choose the implementation

Use the manual method when you have one or two fixed conditions and are comfortable maintaining a child theme. For membership levels, use a visibility add-on or the conditional-menu features supplied by your membership system rather than trying to identify levels with generic WordPress roles.

Do not rely on CSS or JavaScript to secure links. Those methods only hide the text in the browser; they do not stop a member or visitor from opening a restricted URL directly.

Set up level-specific menus

The fast route is Paid Memberships Pro with its Nav Menus Add On. Install and activate Paid Memberships Pro, then install the add-on from Memberships > Add Ons. For classic or hybrid themes, it adds member and logged-in non-member menu locations, and it can create a menu location for each membership level.

Build the menus under Appearance > Menus, then assign them to the matching membership-specific locations. The add-on swaps the menu according to the current login state or membership level.

Handle block themes separately

With a block theme, edit the header template part in Appearance > Editor. Add a Membership Required block, choose the relevant membership level or non-member condition, and place the matching Navigation block inside it. Repeat this for each audience, then save the template.

This approach is useful when your theme does not expose classic menu locations. The conditional navigation method uses one Navigation block inside each membership condition, so check that you have not left an unrestricted Navigation block visible above or below them.

Test every menu state

Check the site as a logged-out visitor, a logged-in user without a level and a test account for every membership level. Confirm the header, footer, mobile menu, mega menu and page-builder navigation separately.

Clear page, object and server caches after changing the rules. A cached menu can make a user see the previous audience's links. Also test the destination URL directly: a hidden link is not proof that the page itself is protected.

The fast route

Let Paid Memberships Pro do it

Membership-level menu rules that show or hide links dynamically; choose it for personalized navigation without custom coding.

Get Paid Memberships Pro

Sources

  1. developer.wordpress.org /reference/functions/wp_nav_menu/?utm_source=openai
  2. paidmembershipspro.com /add-ons/pmpro-nav-menus/?utm_source=openai
  3. paidmembershipspro.com /conditional-main-menu/
  4. paidmembershipspro.com /documentation/content-controls/for-pages/?utm_source=openai
  5. paidmembershipspro.com /documentation/initial-plugin-setup/add-new-membership-level…

Questions

Can WordPress hide menu items by membership level without a plugin?
Not with WordPress core alone. Core can output different menus when your theme code supplies the condition, but it does not understand membership levels. You would need custom code that calls your membership system's API, then maintain that code in a child theme or custom plugin. For simple login-state rules this is reasonable; for several levels, a membership-aware menu tool is safer.
Does hiding a menu item protect the linked page?
No, hiding a menu item only changes navigation. Someone can still visit the page URL directly unless the page, lesson or course is protected by your membership or LMS system. Set the access rule on the destination first, then hide or show the menu link to match it. This prevents a misleading menu while preserving the actual access control.
Should I use WordPress roles for membership visibility?
Use roles only when your membership setup deliberately maps each access group to a reliable role. Many membership systems track levels separately, and a user can hold more than one level. In that case, role checks can show the wrong menu when a subscription changes. A membership-aware condition is more accurate than guessing from a generic role.
Why does the old menu still appear after I change visibility?
The usual causes are a cache, a separate mobile or footer menu, or a second header supplied by a page builder. Clear site and browser caches, then inspect every menu location and template that outputs navigation. Test while logged out and with a separate member account, because an administrator session may not represent the access state you need to check.
What is the quickest way to show different menus for membership levels?
Use Paid Memberships Pro with its Nav Menus Add On, create a menu for each audience, and assign each one to the matching membership-specific location. For a block theme, use the Site Editor with a Membership Required block around each Navigation block. This avoids writing and maintaining custom theme code for the menu conditions.