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

Reply To: I can't get images to show for buddypress search results page

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

#23204
Ernest MarcinkoErnest Marcinko
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' />";
    }
  }