From b075b1615de525d100da8e2b97111bb365ad8270 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Wed, 6 Dec 2023 16:24:57 +0100 Subject: [PATCH] introducing component to be used in taxonomy thematique page --- template-components/faq/faq-rows.php | 61 ++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 template-components/faq/faq-rows.php diff --git a/template-components/faq/faq-rows.php b/template-components/faq/faq-rows.php new file mode 100644 index 0000000..0c41afb --- /dev/null +++ b/template-components/faq/faq-rows.php @@ -0,0 +1,61 @@ + + +have_posts()) : while ($relatedTaxQuestions->have_posts()) : $relatedTaxQuestions->the_post(); ?> + 'conseils', + 'posts_per_page' => 1, + 'tax_query' => array( + array( + 'taxonomy' => 'thematiques', + 'field' => 'term_id', + 'terms' => $questionCurrentSubthematique->term_id, + ) + ) + )); + $relatedFichesConseilsThematiqueQuery = new WP_Query(array( + 'post_type' => 'conseils', + 'posts_per_page' => 1, + 'tax_query' => array( + array( + 'taxonomy' => 'thematiques', + 'field' => 'term_id', + 'terms' => $mainThematique->term_id, + ) + ) + )); + $relatedFicheConseil = $relatedFichesConseilsSubThematiqueQuery->posts[0] ?? $relatedFichesConseilsThematiqueQuery->posts[0] ?? null; + + + ?> +
+ + +
+ +
+
+
+ + + + +
+
+ + + + + +have_posts()) : ?> +

+ \ No newline at end of file