From a6534ffde1b3bc1459e8fe77fd595e21898467b6 Mon Sep 17 00:00:00 2001 From: Yasir Arafat <148990700+Arafat-plugins@users.noreply.github.com> Date: Sun, 25 Jan 2026 09:03:29 +0600 Subject: [PATCH 1/2] filter hooks added for slider --- includes/model/Listings.php | 20 +++++++++++++++----- templates/archive/grid-view.php | 18 ++++++++++++------ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/includes/model/Listings.php b/includes/model/Listings.php index d868b3410c..b07b512e0b 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( + 'addonskit_directorist_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..73cbeec475 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'] ) { From b82ce63fbaa577c66718e6f53614029c28bee7d5 Mon Sep 17 00:00:00 2001 From: Yasir Arafat <148990700+Arafat-plugins@users.noreply.github.com> Date: Tue, 27 Jan 2026 11:53:04 +0600 Subject: [PATCH 2/2] hooks name fixed --- includes/model/Listings.php | 2 +- templates/archive/grid-view.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/model/Listings.php b/includes/model/Listings.php index b07b512e0b..928f306f2a 100644 --- a/includes/model/Listings.php +++ b/includes/model/Listings.php @@ -1299,7 +1299,7 @@ public function render_grid_view( $post_ids ) { foreach ( $post_ids as $listing_id ) { $is_slider = apply_filters( - 'addonskit_directorist_is_slider', + 'directorist_listings_is_slider', false, $this ); diff --git a/templates/archive/grid-view.php b/templates/archive/grid-view.php index 73cbeec475..8ba59b60ba 100644 --- a/templates/archive/grid-view.php +++ b/templates/archive/grid-view.php @@ -23,7 +23,7 @@ $default_class = ( $listings->has_masonry() ? 'directorist-masonry' : '' ) . ' ' . $row_class; ?>