Add remove WordPress dashboard widgets

    function example_remove_dashboard_widgets() {
    // Globalize the metaboxes array, this holds all the widgets for wp-admin
    global $wp_meta_boxes;
    // Remove the incomming links widget
    // Remove right now
    // Hoook into the 'wp_dashboard_setup' action to register our function
    add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets');
    add_action('wp_dashboard_setup', 'example_add_dashboard_widgets');
    function example_add_dashboard_widgets() {
    wp_add_dashboard_widget('example', 'Example', 'example_widget_callback');
    function example_widget_callback() {
    echo 'testin widget';

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: