Personal Menus is an optional feature available in Memberium that enables you to automatically change your theme’s menus on the fly depending on whether the viewer is logged in, and if they are logged in, which membership level they are.
How It Works
Memberium’s Personal Menus works by scanning the menu locations that are created by your theme and creating additional “virtual” versions of those menu locations. A virtual menu location is created for each of your membership levels, and for logged in users. The original menu location created by the menu is used by default and for logged out visitors.
Administrator users will be presented with the standard logged in menu. They do not have tags and will not be given a membership level menu.
Virtual Menus can be easily identified. They are indented slightly from the main default menus.
You can assign custom menus to these virtual menu locations. When the visiting user matches that menu, it will be displayed instead of the standard menu. If no virtual menus are assigned, then the default menu is displayed.
How to Activate Personal Menus
Like our other features, Personal Menus is built into the Memberium core.
Personal Menus implements a simple web interface based on the limits of the WordPress Nav Menu editor. It is not yet scalable to a large number of membership levels, or to use complex decisions to choose which virtual menus are displayed.
You can activate Personal Menus by doing the following steps:
Set the “Personal Menus” switch to On
Click the Save button at the bottom of the screen.
That’s it! You’re all set.
You’ll see your new virtual menu locations appear when you go Appearance -> Menus in WordPress. Your new virtual menu locations will appear in two places in the menu editor.
The first place you can assign virtual menus is at the bottom of the “Edit Menu” page. You’ll see a series of checkboxes, by which you can assign your custom menu.
The second location is on the “Manage Locations” tab. You’ll see each regular menu location, as well as each virtual menu location.
Theme Compatibility
Memberium Personal Menus are compatible with all themes that use standard menu locations.
Best Practices
Scaling to Large Numbers of Access Levels
First, on a per membership level basis, you can disable that membership’s use in Personal Menus, so that virtual menu locations are not created for this membership levels.
Second, you can use the PHP API directly as we cover below under the advanced topics.
Menu Naming
Default Menus
Advanced Techniques
Personal Menus provides a simple system for personalizing the menu assignment based on membership level, or whether the visitor is logged in or not. It doesn’t cover the breath and depth of possibilities that advanced users and sites may need.
Advanced capabilities are still possible through Memberium by using our PHP API and provided filters. Using this system, any menu can be easily replaced dynamically using any criteria you can dream up.
Examples of the possibilities include
- Time of Day
- Combinations of Tags or Membership Levels
- IP Address
- etc.
You can manipulate the Theme menus dynamically with your own code by hooking into our “memberium_personal_menus” filter. This filter will pass the name of the menu to your code, where you can change it to the name of the menu you wish to display using any logic you wish, and return the new menu name.