diff --git a/includes/model/Listings.php b/includes/model/Listings.php index d868b3410c..928f306f2a 100644 --- a/includes/model/Listings.php +++ b/includes/model/Listings.php @@ -1297,11 +1297,21 @@ public function render_grid_view( $post_ids ) { } foreach ( $post_ids as $listing_id ) { - ?> -
+ + $is_slider = apply_filters( + 'directorist_listings_is_slider', + false, + $this + ); + if ( ! $is_slider ) : ?> +
+ + loop_template( 'grid', $listing_id ); ?> -
- +
+ display_preview_image ) ? 'loop-list' : 'loop-list-nothumb'; Helper::get_template( 'archive/' . $template, [ 'listings' => $this ] ); } - + wp_reset_postdata(); } diff --git a/templates/archive/grid-view.php b/templates/archive/grid-view.php index f6da8c3f97..8ba59b60ba 100644 --- a/templates/archive/grid-view.php +++ b/templates/archive/grid-view.php @@ -16,13 +16,19 @@ have_posts() ) : ?> - -
- - render_grid_view( $listings->post_ids() ) ?> - + has_masonry() ? 'directorist-masonry' : '' ) . ' ' . $row_class; + ?> +
+ render_grid_view( $listings->post_ids() ) ?>
- show_pagination && 'numbered' === $listings->options['pagination_type'] ) {