How to position custom dashboard widgets on side column

Written by  on August 25, 2016 

My Question:
Is it possible to add custom dashboard widgets in the right hand column instead of only on the left hands side?

I use wp_add_dashboard_plugin( $widget_id, $widget_name, $callback, $control_callback = null ) to add the plugin code, but it doesn’t have any options to allow you to set the position.

Any suggestions?

My Comments:
The Version 2.8 of WordPress suggests that it’s possible, but I can’t see anything in the code (/wp-admin/includes/dashboard.php) that is related to this.

It seems only to add the dashboard plugin if its name is in the $side_widgets array, the contents of which are:
array('dashboard_quick_press', 'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary');

My thoughts are that I’d have to directly modify $wp_meta_boxes['dashboard'] – but I’m not sure of the consequences of this.

Category : Wordpress

Tags :