This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Use of users custom fields in a product search

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Use of users custom fields in a product search Reply To: Use of users custom fields in a product search

#27155
Ernest MarcinkoErnest Marcinko
Keymaster

That is actually very helpful. Maybe this variation:

add_filter( 'asp_results', 'asp_custom_images_gr', 10, 4 );
function asp_custom_images_gr( $results, $id, $is_ajax, $args ) {
	global $WCFM, $WCFMmp;
	foreach ($results as $k=>&$r) {
		if ( $r->content_type == 'user' ) {
			$store_user = wcfmmp_get_store( $r->id );
			$r->image = $store_user->get_avatar();
		}
	}

	return $results;
}