Hi support
I am using whoop and I would like to display the first 4 thumbnails of the photo gallery right above the Tabs section in the Event Details Page. I know which hook to use and in the forum I found this snippet that display ALL the thumbnails:
add_action(‘geodir_event_details_main_content’, ‘geodir_detail_page_images_hc’, 51);
function geodir_detail_page_images_hc() {
global $post, $post_images;
$post_images = geodir_get_images($post->ID,’thumbnail’);
$thumb_image = ”;
if(!empty($post_images)){
$thumb_image .= ‘<div id=”geodir-post-gallery” class=”clearfix”>’;
foreach($post_images as $image){
$thumb_image .= ‘src.'”>’;
$thumb_image .= geodir_show_image($image,’thumbnail’,true,false);
$thumb_image .= ‘‘;
}
$thumb_image .= ‘</div>’;
}
echo $thumb_image;
}
Please could you tell me how to modify it to display only the first 4?
NOTE that when the gallery opens it must work as usual showing ALL the photos (not only the first 4).
Thanks a lot
Fabrizio