From bb842dedc4fe7757bd8c5eb9bb2115960d76a09a Mon Sep 17 00:00:00 2001 From: Antoine M Date: Mon, 30 Jun 2025 17:54:13 +0200 Subject: [PATCH] FEATURE Refining the component aspect --- .../acf-blocks/team-authors/team-authors.php | 48 ++++++++++++------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/plugins/dynamiques-blocks/acf-blocks/team-authors/team-authors.php b/plugins/dynamiques-blocks/acf-blocks/team-authors/team-authors.php index 5b6556f..e5f886b 100644 --- a/plugins/dynamiques-blocks/acf-blocks/team-authors/team-authors.php +++ b/plugins/dynamiques-blocks/acf-blocks/team-authors/team-authors.php @@ -4,6 +4,9 @@ $comities_field_object = get_field_object('field_6836da6d03ff6'); $comities = $comities_field_object ? $comities_field_object['choices'] : []; $field_auteurs = get_field_object('auteurs', 'group_auteurs'); +$placeholder_thumbnail_counter = 0; + + $authors = get_posts(array( 'post_type' => 'auteurs', @@ -20,40 +23,49 @@ $authors = get_posts(array(
$comity_label) : ?> + 'auteurs', + 'posts_per_page' => -1, + 'orderby' => 'title', + 'order' => 'ASC', + 'meta_query' => array( + array( + 'key' => 'comity', + 'value' => $comity_value, + 'compare' => 'LIKE', + ), + ), + )); + + if (count($comities_related_authors) < 1) continue; + + ?>

- 'auteurs', - 'posts_per_page' => -1, - 'orderby' => 'title', - 'order' => 'ASC', - 'meta_query' => array( - array( - 'key' => 'comity', - 'value' => $comity_value, - 'compare' => '=', - ), - ), - )); ?> -