wordpress admin bar for logged in users

Discussion in 'aMember Pro v.4' started by tashworth, Jan 29, 2014.

  1. tashworth

    tashworth New Member

    Joined:
    Aug 22, 2006
    Messages:
    8
    I am trying to display the wordpress admin bar on top for logged in users? Here is wha tI have added as a function. It works if I am logged in a WP Admin, but not when logged in to amember.

    function optionsframework_rolescheck () {
    if ( current_user_can( 'edit_theme_options' ) ) {
    // If the user can edit theme options, let the fun begin!
    add_action( 'admin_menu', 'optionsframework_add_page');
    add_action( 'admin_init', 'optionsframework_init' );
    add_action( 'wp_before_admin_bar_render', 'optionsframework_adminbar' );
    } elseif ( Am_Lite::getInstance()->isLoggedIn() ) {
    add_action( 'admin_menu', 'optionsframework_add_page');
    add_action( 'admin_init', 'optionsframework_init' );
    add_action( 'wp_before_admin_bar_render', 'optionsframework_adminbar' );
    } else {
    }
    }

    and yes Am_Lite::getInstance()->isLoggedIn() evaluates as TRUE.

    Any help appreciated

Share This Page