From e0ecb88b5e228b6ea913a3dbbcab2d385ca406eb Mon Sep 17 00:00:00 2001 From: Antoine M Date: Mon, 2 Dec 2024 14:26:28 +0100 Subject: [PATCH] removing uncessary metabox --- includes/chantiers.php | 54 ++---------------------------------------- 1 file changed, 2 insertions(+), 52 deletions(-) diff --git a/includes/chantiers.php b/includes/chantiers.php index 78e046b..9793b4e 100644 --- a/includes/chantiers.php +++ b/includes/chantiers.php @@ -1,58 +1,8 @@ 'chantiers', - 'posts_per_page' => -1, - 'post_status' => 'publish', - 'meta_query' => array( - array( - 'key' => 'artisan', - 'value' => $post->ID, - 'compare' => '=', - ), - ), - ); - - $chantiers = new WP_Query($args); - - - // Afficher les chantiers - - if ($chantiers->have_posts()) { - - echo ''; - } else { - echo '

Ce chantier n\'est relié à aucun artisan

'; - } -} - add_action('acf/render_field', function ($field) { // Vérifiez si le champ est celui que vous voulez personnaliser @@ -66,7 +16,7 @@ add_action('acf/render_field', function ($field) { if ($linked_post_id) { $edit_link = get_edit_post_link($linked_post_id); - echo ' Voir la fiche de l\'artisan '; + echo ' Voir la fiche de l\'artisan '; } } }, 10, 1);