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

Reply To: No images showing

#22899
Ernest MarcinkoErnest Marcinko
Keymaster

Hi Wayne,

Thanks, I think I was able to resolve this. Based on the theme files, I have constructed and added the following code to the functions.php file in the child theme directory:

add_filter('asp_results', 'asp_fix_images_for_auction_theme', 10, 1);
function asp_fix_images_for_auction_theme( $results ) {
	foreach ( $results as $k => &$r ) {
		if ( isset($r->post_type) ) {
			$id_of_firstpic = AuctionTheme_get_first_post_image_post_id($r->id);
			if ( !empty($id_of_firstpic) ) {
				$im = AuctionTheme_get_post_images_first($r->id,4);	
				$img = AuctionTheme_wp_get_attachment_image($im, array(900, 700));
				$r->image = $img;
			}
		}
	}
    return $results;
}

It should display the images now.