I cannot figure out how to arrange my custom widgets one left and one right.
I’m using this code to create custom widgets:
//Add my comments. Shows user his last 5 comments
function dashboard_user_comments_widget_function() {
echo 'beh!';
}
function dashboard_user_add_comments_widget_function() {
wp_add_dashboard_widget('my_comments_user_dashboard_widget', 'My comments', 'dashboard_user_comments_widget_function');
}
add_action('wp_dashboard_setup', 'dashboard_user_add_comments_widget_function');
Is there a way to pass a left/right variable into this function?
I read the codex page for it and the way they explain doing positioning is quite complicated, I don’t know how to incorporate it.
The dashboard widget function
wp_add_dashboard_widget()
is just a wrapper foradd_meta_box()
. So you can use the underlying function instead.