diff --git a/template-parts/post-types/actualites/archive-grid.php b/template-parts/post-types/actualites/archive-grid.php new file mode 100644 index 0000000..08d969a --- /dev/null +++ b/template-parts/post-types/actualites/archive-grid.php @@ -0,0 +1,52 @@ + $current_post_type, + 'posts_per_page' => $post_amount, + 'post_status' => 'publish', +); + +// Si on a une étiquette, ajouter le filtre taxonomy +if (!empty($etiquette_slug)) { + $query_args['tax_query'] = array( + array( + 'taxonomy' => 'etiquettes', + 'field' => 'slug', + 'terms' => $etiquette_slug, + ), + ); +} + + +$posts_query = new WP_Query($query_args); + +?> + + +
+
+ + $posts_query, + 'current_post_type' => $current_post_type, + 'etiquette_active_filter_slug' => $etiquette_slug, + )); ?> + + +
+
\ No newline at end of file