using custom meta user data to run queries in WordPress

wp_get_current_user() does not return all the data for the user, you should try using get_user_meta(). Try as below $company = get_user_meta($current_user->ID,’company’); $mf_group = get_user_meta($current_user->ID,’mf_group’); and in your post loop changes this two lines as below ‘company’ => $company[0], ‘mf_group’ => $mf_group[0], Hope this helps.