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

Reply To: Activity Page Photos Not Showing

#33871
Ernest MarcinkoErnest Marcinko
Keymaster

Thank you!

Well, in that case there is a custom code worth trying. I could not find much information about this on the buddypress API, so this may not work at all.

add_filter( 'asp_results', 'asp_fetch_image_from_activity', 10, 1 );
function asp_fetch_image_from_activity( $results ) {
	foreach ($results as $k => &$r ) {
		if ( $r->content_type == 'bp_activity') {
			$activity = bp_activity_get_specific( array( 'activity_ids' => $r->id ) );
			$activity = $activity['activities'][0];
			$im = asp_get_image_from_content($activity->action);
			if ( $im != '' ) {
				$r->image = $im;
			}
		}
	}
	return $results;
}

Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.