From 439029c830a02c0eaca8440e4cf273d96f8ca4b5 Mon Sep 17 00:00:00 2001 From: Antoine Date: Mon, 16 Mar 2026 10:14:58 +0100 Subject: [PATCH] REFACTOR post-grid.php to utilize the new post-grid-toolbar component, streamlining the code by removing redundant elements and enhancing maintainability. --- .../components/archive/post-grid.php | 71 ++----------------- 1 file changed, 6 insertions(+), 65 deletions(-) diff --git a/template-parts/components/archive/post-grid.php b/template-parts/components/archive/post-grid.php index fa6dac1..eb47b63 100644 --- a/template-parts/components/archive/post-grid.php +++ b/template-parts/components/archive/post-grid.php @@ -1,83 +1,23 @@ $current_post_type, 'posts_per_page' => $post_amount )); -$post_count = $posts_query->post_count; - -$types = get_terms(array( - 'taxonomy' => 'type', - 'hide_empty' => true, -)); - -// write_log($current_post_type_obj); - ?> +

-
- -
-

Filtrer par

-
- - -
- -
-
- - - - - - -
- -

- - - - 1) : ?> - - labels->name; ?> - - - - labels->singular_name; ?> - - -

- -
- + $posts_query, + 'current_post_type' => $current_post_type, + )); ?>
    have_posts()) : ?> @@ -87,5 +27,6 @@ $types = get_terms(array( )); ?> +
\ No newline at end of file