How to set every new blog with the exact dashboard widget config I want ?

Greetings,

I'm launching a blog network with some advanced customization of the users admin, and you're various plugins have been very helpful.

However, there is one thing I cannot do.

What I want is to fix the position and order and every widgets on the dashboard admins for each and every new users (users that will have the "admin" status for their own blog).

Here's what I want :

Left column : a custom dashboard widget created with your plugin "Custom Dashboard Widget"

Right column : "Right now", and below that, "Activity"

I need that setup to be done each time a new user create a blog.

I tried to use the "Dashboard Widget Order" plugin but I don't really now how to change the code and I haven't found detailed enough explanation in the "Usage" section.

Thanks a lot for your help,

DJ

  • Jack Kitterhing

    Hi there @DJExp,

    Hope you're well today and thanks for your question! :slight_smile:

    You'll need to download the plugin from here https://premium.wpmudev.org/project/dashboard-widget-order/ (click, "No thanks, download directly".

    Then open up dashboard-widgets-order.php with your text editor of choice, scroll to line 42, you'll see this.

    //---Config---------------------------------------------------------------//
    //------------------------------------------------------------------------//
    //  change the order of the widgets here
    $dashboard_widgets_order['normal']['core'][] = 'dashboard_right_now';
    $dashboard_widgets_order['normal']['core'][] = 'dashboard_activity';
    $dashboard_widgets_order['normal']['default'][] = 'dashboard_incoming_links';
    
    $dashboard_widgets_order['side']['core'][] = 'dashboard_quick_press';
    $dashboard_widgets_order['side']['default'][] = 'dashboard_primary';
    
    $dashboard_widgets_order['column3']['high'][] = 'dashboard_secondary';
    
    $dashboard_widgets_order['column4']['high'][] = 'dashboard_plugins';

    Change those to the order you want by literally just moving them in the order, so something like

    //---Config---------------------------------------------------------------//
    //------------------------------------------------------------------------//
    //  change the order of the widgets here
    $dashboard_widgets_order['normal']['core'][] = 'dashboard_activity';
    $dashboard_widgets_order['normal']['core'][] = 'dashboard_right_now';
    $dashboard_widgets_order['normal']['default'][] = 'dashboard_incoming_links';
    
    $dashboard_widgets_order['side']['default'][] = 'dashboard_primary';
    $dashboard_widgets_order['side']['core'][] = 'dashboard_quick_press';
    
    $dashboard_widgets_order['column3']['high'][] = 'dashboard_secondary';
    
    $dashboard_widgets_order['column4']['high'][] = 'dashboard_plugins';

    Thanks!

    Kind Regards
    Jack.

  • DJExp

    Hey, thanks for the help !

    There is one thing missing though.

    I changed the content like that :

    //------------------------------------------------------------------------//
    //---Config---------------------------------------------------------------//
    //------------------------------------------------------------------------//
    //  change the order of the widgets here
    $dashboard_widgets_order['normal']['core'][] = 'custom_content_dashboard_widget';
    
    $dashboard_widgets_order['side']['default'][] = 'dashboard_right_now';
    $dashboard_widgets_order['side']['core'][] = 'dashboard_activity';
    
    //  Change this if you update the widget order and want all users to have

    And I also changed the order hash...

    But for a reason I don't understand, the "right now" plugin is BELOW the "activity" plugin, and I need it the other way around...

    What am I missing ?

    Thanks again for your help,

    DJ

  • Jack Kitterhing

    Hi there @DJExp,

    Hope you're well today and thanks for your question! :slight_smile:

    You have the right now widget with default where it should have core, so change.

    $dashboard_widgets_order['side']['default'][] = 'dashboard_right_now';

    to

    $dashboard_widgets_order['side']['core'][] = 'dashboard_right_now';

    And that should work correctly then for you. :slight_smile:

    Thanks!

    Kind Regards
    Jack.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.