0

I've created a standard page with a top level menu using add_menu_page() and I want to turn that page into a bespoke dashboard, ie to have a number of boxes like the dashboard widgets using something like wp_add_dashboard_widget(). I cannot find any documentation that even suggests this is possible and I've looked into creating dashboards widgets and then doing something like

global $wp_meta_boxes;
$my_widget = $wp_meta_boxes['dashboard']['normal']['core']['example_dashboard_widget'];
unset($wp_meta_boxes['dashboard']['normal']['core']['example_dashboard_widget']);
$wp_meta_boxes[$my_dashboard]['normal']['core']['example_dashboard_widget'] = $my_widget;

where $my_dashboard has variously been a $hook from $hook=add_menu_page() and the page slug etc, but it hasn't worked. As you can tell, I'm shooting in the dark here but this functionality would be very useful to me. Does anyone know how this can be done?

Edit: I've found the answer to my own question here

http://www.code-styling.de/english/how-to-use-wordpress-metaboxes-at-own-plugins

2
  • 1
    Dashboard widgets only go on the dashboard. You can't put 'em on any other pages, as far as I know.
    – Bainternet
    Commented Mar 22, 2012 at 21:11
  • I'm going to answer my own question... I finally found this and it works for what I need, with soem amendments :-) code-styling.de/english/…
    – Adam
    Commented Mar 22, 2012 at 21:41

2 Answers 2

1

I've edited my question to include the fact that I've found the answer to my own question here

http://www.code-styling.de/english/how-to-use-wordpress-metaboxes-at-own-plugins

in case anyone finds the question while searching for a similar solution. The two column variation he includes in his solution no longer seems to work but is a simple thing to override.

0

Add metaboxes, dashboard widgets are for the dashboard only!

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.