Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › I can't get images to show for buddypress search results page › Reply To: I can't get images to show for buddypress search results page
June 20, 2019 at 3:05 pm
#23204
Keymaster
No, it should work with anytthing there. Mabye something is overriding those images, I am not sure.
Try maybe a bit more advanced modification:
$asp_type = get_asp_result_field('content_type');
$asp_img = get_asp_result_field('image');
$asp_id = get_asp_result_field('id');
if ( !empty($asp_img) ) {
echo "<img src='$asp_img' />";
} else if ( $asp_type == 'user' ) {
if ( function_exists('bp_core_fetch_avatar') ) {
$im = bp_core_fetch_avatar(array('item_id' => $asp_id, 'html' => false));
} else {
$im = $this->get_avatar_url($asp_id);
}
if ( !empty($im) ) {
echo "<img src='$im' />";
}
}