diff --git a/includes/dashboard-widget.php b/includes/dashboard-widget.php index 904894d..26cfc05 100644 --- a/includes/dashboard-widget.php +++ b/includes/dashboard-widget.php @@ -16,9 +16,70 @@ function custom_dashboard_widget_display() { $current_user = wp_get_current_user(); $user_name = $current_user->user_login; + + + + $args = array( + 'post_type' => 'artisans', + 'meta_key' => 'conseiller', + 'meta_value' => $current_user->ID, + 'posts_per_page' => -1 + ); + + $user_attached_artisans = new WP_Query($args); + + + + $required_actions_artisans = new WP_Query( + array( + 'post_type' => 'artisans', + 'meta_key' => 'conseiller', + 'meta_value' => $current_user->ID, + 'meta_query' => array( + array( + 'key' => 'required_action', + 'value' => true, + 'compare' => '=' + ) + ), + 'posts_per_page' => -1 + ) + ); + ?>
Ceci est un widget personnalisé. Vous pouvez afficher ici des infos utiles, des liens ou tout autre contenu.
+Artisans associés : posts) ?>
+Aucun artisan en attente d'action
+ "count"> action requise + +