I want to create a custom Dashboard with my own widgets

I’m creating a dashboard for a custom plugin.
It would be nice if I could create a custom dashboard that looks just like the default dashboard but with my own widgets. But the drag’n’drop and the collapse/expand functionality

I know how to add normal dashboard widgets

Read More

anybody got any pointers?

Related posts

Leave a Reply

1 comment

  1. That’s not a ready to use solution, but you can check out the code from these files:

    • wp-admin/index.php
    • wp-admin/includes/dashboard.php

    You’ll need the dashboard script, then initialize the widgets section with the following code:

    <div id="dashboard-widgets-wrap">
        <?php wp_dashboard(); ?>
        <div class="clear"></div>
    </div><!-- dashboard-widgets-wrap -->
    

    This should give you the same contents as the default dashboard. Once you’ve done that, you can disable some of the widgets and add others just for this page. This will allow you to use the default dashboard api which is always a good idea in case you want to move your widgets to the main dashboard.

    Edit: here’s how to add/remove dashboard widgets: http://theme.it/an-in-depth-look-at-the-dashboard-widgets-api/.