Default Dashboard Layout for New Users
Gives every user who has never arranged their dashboard the same widget order and columns you choose, so clients see the most useful widgets first.
Opens WPIDE on
Code
// Column => comma-separated widget IDs, in order.
$wpide_dashboard_layout = array(
'normal' => 'dashboard_site_health,dashboard_right_now,dashboard_activity',
'side' => 'dashboard_quick_press,dashboard_primary',
'column3' => '',
'column4' => '',
);
add_filter( 'get_user_option_meta-box-order_dashboard', function ( $order ) use ( $wpide_dashboard_layout ) {
return empty( $order ) ? $wpide_dashboard_layout : $order;
} );
Notes
List widget IDs per column; users who later drag widgets around keep their own layout.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.