• Resolved Vitalii

    (@wwvitalik)


    I created a new role (User roles –> Add new) but it doesn’t appear in the Admin filtering options (Member directory –> Admin filtering).

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @wwvitalik

    Please try adding the following code snippet to your theme/child-theme’s functions.php file or use the Code Snippet plugin to run the code:

    add_filter("um_member_directory_filter_select_options","um_111821_filtering_role_options", 10, 3);
    function um_111821_filtering_role_options( $options, $values_array, $attrs  ){
        if( "role_select" == $attrs['metakey'] ){
            $options = UM()->roles()->get_roles();
        }
        return $options;
    }

    The above will add all roles to the select field’s options.

    Regards,

    Thread Starter Vitalii

    (@wwvitalik)

    It works, thanks!
    But that must be a part of the plugin’s default functionality.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @wwvitalik

    Thanks for letting us know. I’ve created an issue on our public Github repository regarding the issue: https://github.com/ultimatemember/ultimatemember/issues/944

    Regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Admin filtering in members directory doesn’t show my created role’ is closed to new replies.