Skip to content

Instantly share code, notes, and snippets.

@Glinkfr
Created March 31, 2019 15:50
Show Gist options
  • Save Glinkfr/008c99afcdf2b64ae9278f5f4e8e8981 to your computer and use it in GitHub Desktop.
Save Glinkfr/008c99afcdf2b64ae9278f5f4e8e8981 to your computer and use it in GitHub Desktop.
Ajouter un widget dans le tableau de bord
# ajoute un widget a la partie admin
function votre_dashboard_widget() {
echo'<h3>Bienvenue</h3><p>Votre contenu HTML ou PHP.</p>';
}
function ajout_votre_dashboard_widget() {
wp_add_dashboard_widget( 'votre_dashboard_widget', __( 'Le titre du Widget' ), 'votre_dashboard_widget' );
}
add_action('wp_dashboard_setup', 'ajout_votre_dashboard_widget' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment