For Dashboards with a large number of Child Sites (a few hundred and more), the number of entries logged in the Non-MainWP widget can grow to many thousands.
This can slow down the load time of the Overview page on which the Non-MainWP Widget is located.
To decrease the load time, add the following code snippet to your MainWP Dashboard:
add_filter( 'mainwp_widget_site_actions_limit_number', 'mycustom_mainwp_widget_site_actions_limit_number' ); function mycustom_mainwp_widget_site_actions_limit_number( $value ) { return 200; }
Using MainWP Custom Dashboard Extension
- Install MainWP Custom Dashboard extension
- Navigate to your MainWP Dashboard > Extensions > Custom Dashboard
- Open PHP tab
- Add the following code snippet
add_filter( 'mainwp_widget_site_actions_limit_number', 'mycustom_mainwp_widget_site_actions_limit_number' ); function mycustom_mainwp_widget_site_actions_limit_number( $value ) { return 200; }
- Click Save Changes button
Editing functions.php file
- Navigate to the WordPress dashboard where your MainWP is installed
- Go to Tools > Theme File Editor
- On the right, locate the Theme Functions (functions.php) file and click on it
Note: If you are not using a Child Theme, a theme update will overwrite this file. So, in that case, you can insert the snippet using a plugin like Code Snippets. - Add the following code snippet to the end of the file
add_filter( 'mainwp_widget_site_actions_limit_number', 'mycustom_mainwp_widget_site_actions_limit_number' ); function mycustom_mainwp_widget_site_actions_limit_number( $value ) { return 200; }
- Click Update File button