Wordpress, get membership to display menu

Discussion in 'Setting-up protection' started by japster24, Apr 27, 2013.

  1. japster24

    japster24 New Member

    Joined:
    Jan 22, 2013
    Messages:
    2
    I am using the wordpress plugin and need to display one menu if not logged in, and another menu if logged in. Below is what I have so far...not working:

    /**Swap nav for member logged in */
    session_start(); $user = $_SESSION['_amember_user']; if ($user['member_id'] > 0)
    {
    //Not a member logged in, use first menu
    add_action( 'genesis_after_header', 'genesis_do_nav' );
    remove_action( 'genesis_after_header', 'genesis_do_subnav' );
    }
    else
    {
    //Member, use second menu
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_after_header', 'genesis_do_subnav' );
    }
  2. gswaim

    gswaim CGI-Central Partner

    Joined:
    Jul 2, 2003
    Messages:
    641
  3. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    What aMember version do you have?
    That code is for aMember v3 it will not work with aMember v4.

Share This Page