Keith_Saunders (@keith_saunders)

Forum Replies Created

Viewing 1 replies (of 1 total)

  • Keith_Saunders
    Participant

    @keith_saunders

    I have the same issue which I have been trying to find a solution for days now.

    Like angelfire4xx I just want to create roles for Gold, Silver and Bronze members.

    Like others I have scanned lots of posts and documentation and tried various suggestions.

    I have in my child functions the following which I did manage to actually create roles, but they did not work using the following code

    function add_custom_role( $bbp_roles ) {

    $bbp_roles[‘BRONZE Member’] = array(
    ‘name’ => ‘BRONZE Member’,
    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_participant_role() ));

    $bbp_roles[‘SILVER Member’] = array(
    ‘name’ => ‘SILVER Member’,
    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_participant_role() ));

    $bbp_roles[‘GOLD Member’] = array(
    ‘name’ => ‘GOLD Member’,
    ‘capabilities’ => bbp_get_caps_for_role( bbp_get_participant_role() ));

    return $bbp_roles;
    }

    add_filter( ‘bbp_get_dynamic_roles’, ‘add_custom_role’, 1 );

    When I installed the “Members” plugin it told me the following

    Warning: Undefined array key “bronze_member” in /homepages/17/d531871193/htdocs/clickandbuilds/BeoworldForum/wp-content/plugins/members/inc/functions-roles.php on line 257

    for each of the created custom roles, hence why it does not work.

    Can anyone suggest a way forward other than what is already been posted.

Viewing 1 replies (of 1 total)