From 14d66ebb46cffd7520b782eea1158b49f6973fbf Mon Sep 17 00:00:00 2001 From: Antoine M Date: Thu, 24 Oct 2024 10:40:10 +0200 Subject: [PATCH] introducing the component --- .../artisans/card-artisans-search.php | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 template-components/artisans/card-artisans-search.php diff --git a/template-components/artisans/card-artisans-search.php b/template-components/artisans/card-artisans-search.php new file mode 100644 index 0000000..c9b814c --- /dev/null +++ b/template-components/artisans/card-artisans-search.php @@ -0,0 +1,64 @@ + 'card-artisans__thumbnail card-post__thumbnail')) ?? null; + +$post_title = $args['post_title']; +$post_permalink = get_the_permalink($postID); +$company_members = get_field('company_members', $postID); +$currentTaxonomy = $args['current_taxonomy']; + +$taxonomyTerms = $currentTaxonomy === "elementsbatiments" ? get_the_terms($postID, 'elementsbatiments') : get_the_terms($postID, 'metiers'); + + +$phoneNumber = get_field('phone_number', $postID); +$formattedPhoneNumber = preg_replace('/^(\+\d{2})(\d{3})(\d{2})(\d{2})(\d{2})$/', '$1 $2 $3 $4 $5', $phoneNumber); +$email = get_field('email', $postID); +$website = get_field('website', $postID); + +$adresse = get_field('adresse', $postID); +?> + + +
+ +
+ +

+ + +

+ $member) : ?> + + +

+ + +
+ $term) : ?> + name; ?> + +
+ + + +

+ + + + + + + + + + + + + + + + +   + + +
\ No newline at end of file