Different Menus for Logged-In Users in WordPress

Different Menus for Logged-In Users in WordPress

I'm signed in. I know I'm signed in. My name is in the corner, with a little picture of me from a better year. And the menu says, in large friendly letters: Log in. Log in where? I'm here. We just met.

A menu that changes with the visitor fixes that. Guests see "Join" and "Log in"; members see "My account" and "Log out". There are four ways to do it, and which one is yours depends on your theme. It takes between five and fifteen minutes.

Which method is yours?

Your siteMethod
Classic theme, you have Appearance → Menus1, with a plugin
Block theme, you have Appearance → Editor2, with blocks
You want two complete menus, and code doesn't scare you3, a snippet
A store or a membership siteLook at its own settings first

Try it on a staging copy. Menus are the furniture of a site: people know where everything is in the dark, and they do notice when you move the table.

Method 1: a plugin (classic themes)

Two plugins do this well, and neither asks for code. Figures from WordPress.org, November 2026:

PluginBest forInstalls, rating (reviews)
User MenusNames, avatars and a log out link70,000+
5.0 (1,282)
Nav Menu RolesRules by role70,000+
4.9 (219)
Block VisibilityBlock themes (method 2)40,000+
4.9 (108)

With User Menus:

  1. Install it and open Appearance → Menus.
  2. Open a menu item. You'll see a new option: who can see it.
  3. Choose Logged in users, Logged out users or everyone. For members, you can limit it to certain roles.
  4. Add the Login, Register and Logout links the plugin provides, and save.

It can also show the user's name in the menu. "Hello, Martha" is pleasant. Put it in a dropdown, because Martha may be called Maximiliana Fernández de Córdoba, and your header was designed for "Al".

Nav Menu Roles is similar and finer about roles. It warns about something important in its own listing: it hides the link, not the page. More about that below.

We don't recommend If Menu, although you will find it on every list: its last update was in December 2024.

Method 2: block themes

Block themes don't use Appearance → Menus. The navigation is a block, and that makes it easier.

  1. For the sign-in link alone, add the core Login/out block next to the navigation. It says "Log in" or "Log out" depending on the visitor, with no plugin.
  2. For more, install Block Visibility.
  3. In Appearance → Editor, open the header and select the navigation block.
  4. In the sidebar, under Visibility, choose to show it only to logged-out users.
  5. Duplicate the block, change its menu, and show that one only to logged-in users (or to a role).
  6. Save and check in a private window.

The two blocks occupy the same place, and nobody sees both. They are like those couples who take turns at parties.

Method 3: a snippet (classic themes)

Create two menus in Appearance → Menus, for example "Guests" and "Members". Then add this to your child theme or a snippets plugin:

add_filter( 'wp_nav_menu_args', function ( $args ) {
  $location = $args['theme_location'] ?? '';
  if ( 'primary' === $location && is_user_logged_in() ) {
    $args['menu'] = 'Members';
    $args['theme_location'] = '';
  }
  return $args;
} );

Change primary for the name of your theme's location, and Members for your menu's name. Assign "Guests" to that location as usual: it is what everyone else will see.

To limit it to a role, replace the condition with current_user_can( 'edit_posts' ) or the permission you need. Don't compare role names: permissions are what WordPress checks.

Method 4: what your plugin already does

WooCommerce has an account page that shows a sign-in form or the customer's panel at the same address, so one link called "My account" serves both. Membership and course plugins often add their own menu items. Look before you install anything; here are the membership plugins.

The cache trap

This is where most of these setups go wrong. If your page cache serves members the copy made for guests, everybody sees the guest menu, including Martha, who is starting to take it personally.

  1. Set the cache to skip logged-in users. Nearly all page caches do it by default; check it.
  2. If your hosting or CDN caches by itself, check there too.
  3. Clear everything after the change.
  4. Test with two browsers at once: one signed in, the other in a private window. Reload both several times.

The opposite mistake is worse: a guest receiving a member's page with a name on it. If that ever happens, switch off the cache for signed-in users at once and find the cause before anything else.

Hiding isn't protecting

A hidden link is still a door with no sign. Whoever knows the address walks in. If the page is private, protect the page, with a membership plugin or your own rules, and treat the menu as what it is: directions. Our guide to content protection covers the locks.

What to put in each menu

GuestsMembers
What you offer, pricesTheir content or dashboard
ContactHelp
Log inMy account
Join, as a buttonLog out

Keep the order. If Contact is third for guests, leave it third for members. Same house, same light switches.

Members' pages can't be cached like a blog's, so they ask more of the server. Our managed WordPress hosting is ready for that kind of traffic.

Now open your site, sign in, and look at the corner. If it still offers to let you in, you know where to begin. You could introduce yourself again, but it's been years.

Related Articles

WordPress Accessibility: EAA & WCAG 2.2 Checklist WordPress Tutorials

WordPress Accessibility: EAA & WCAG 2.2 Checklist

WordPress accessibility checklist for the EAA and WCAG 2.2: fix contrast, keyboard, forms and checkout issues. Start auditing your site today.

Nov 23, 2026
WordPress Plugin Conflicts: Find & Fix Them WordPress Tutorials

WordPress Plugin Conflicts: Find & Fix Them

WordPress plugin conflicts: find the cause and fix it fast with this step-by-step guide. Try Phluit hosting.

Nov 9, 2026
WordPress Maintenance Plan: What Agencies Should Include WordPress Tutorials

WordPress Maintenance Plan: What Agencies Should Include

WordPress maintenance plan essentials for agencies: updates, backups, security. Build yours and explore Phluit hosting today.

Nov 2, 2026