Filtering Members Directory
-
In Ultimate Member v2.0.56, the following code used to work to filter the results of the Members Directory:
add_filter('um_prepare_user_query_args', 'um_my_custom_query_args', 99, 2); function um_my_custom_query_args( $query_args, $args ) { $industry = 'doctor'; // Filter Members Directory by Industry. if (!empty($industry)) { $query_args['meta_query'][] = array( "relation" => "OR", array( 'key' => 'pp_industry', 'value' => serialize( $industry ), 'compare' => 'LIKE' ), array( 'key' => 'pp_industry', 'value' => $industry, 'compare' => '=' ) ); }
Now that the Members Directory is displayed through AJAX, the above code does not filter it at all. What’s the new method for filtering the Members Directory in Ultimate Member 2.1.2?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Filtering Members Directory’ is closed to new replies.