Documentation

Front-end Membership Modules

Home / Configuring Nav Menus

Configuring Nav Menus

If your WordPress theme supports Nav Menus, this plugin registers two new menu locations on your WordPress installation. You can check these menu locations under Appearance >> Menus.

  1. Visitors Only Menu (Membership Modules)
    This menu is only visible to users who are not logged in to your website.
  2. Users Only Menu (Membership Modules)
    This menu is only visible to logged in users.

Configuring these menus in your theme

NOTE: This is an advanced topic, if you are not sure about this, we recommend you to talk to your WordPress Theme developer to make this change or you can hire us to modify your theme.

  1. You need to browse your WordPress theme files to find the PHP function wp_nav_menu that calls the WordPress navigation menu. In most cases it should be within header.php file. If you are not sure, you can ask the Theme developer for this.
  2. Once you find this function you will see a PHP Array which contains the menu_location key and its value set to a location registered by the theme.
  3. You need to replace ‘menu_key_as_per_theme’ with cjfm_navigation_menu(). Once you do this the second line of above should look like this. Do not change anything else in this PHP array.
  4. PHP function cjfm_navigation_menu() returns the nav menu location based on the user logged in status. Visitors Only Menu will be called if user is not logged in to your website and Users Only Menu will be called for logged in users.