> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mainwp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to limit the number of entries loaded in the Non-MainWP widget

> Limit the number of entries in the Non-MainWP widget to improve Dashboard performance for sites with hundreds of child sites.

For Dashboards with many child sites, the Non-MainWP widget can accumulate thousands of entries, slowing down the Overview page. You can limit the number of entries displayed to improve performance.

## What You'll Learn

* Why large Dashboards need entry limits
* How to set a custom limit
* Two methods to apply the setting

## Prerequisites

* Choose **one** method below (using both is unnecessary)

***

## When to Use This

Apply this setting if:

* You manage hundreds of child sites
* The Overview page loads slowly
* The Non-MainWP widget has thousands of entries

The default behavior loads all entries, which can cause performance issues on large Dashboards.

***

## Method 1: Custom Dashboard Extension (Recommended)

**1. Install Custom Dashboard**

[Install](https://docs.mainwp.com/dashboard/overview/manage-extensions.md#install-add-ons) the [Custom Dashboard Extension](https://mainwp.com/extension/mainwp-custom-dashboard-extension/).

**2. Open the add-on**

Navigate to **MainWP > Add-ons > Custom Dashboard**.

**3. Add the PHP code**

Go to the **PHP** tab and add this code:

```php theme={null}
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;
}
```

![Custom Dashboard Extension PHP tab with code snippet](https://mintcdn.com/mainwp/4hVi87YDiCv3ZeGl/images/developers/limit-entries-snippet.png?fit=max\&auto=format\&n=4hVi87YDiCv3ZeGl\&q=85\&s=32cc44f10a8a2ec27f5a14c3f5b16f15)

**4. Adjust the limit**

Change `200` to your preferred maximum number of entries.

**5. Save changes**

Click **Save Changes**. The widget now displays only the specified number of entries.

***

## Method 2: Edit functions.php

Use this method if you prefer not to install an add-on.

> [!WARNING]
>
> If you're not using a child theme, theme updates will overwrite your changes. Consider using a plugin like [Code Snippets](https://wordpress.org/plugins/code-snippets/) instead.

**1. Open Theme File Editor**

Navigate to **WP Admin > Tools > Theme File Editor** on your Dashboard site.

**2. Select functions.php**

In the right sidebar, click on **Theme Functions (functions.php)**.

**3. Add the code**

Add this code at the end of the file:

```php theme={null}
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;
}
```

**4. Save the file**

Click **Update File**.

***

## Recommended Limits

| Number of Child Sites | Suggested Limit |
| - | - |
| 100-200 sites | 500 entries |
| 200-500 sites | 200 entries |
| 500+ sites | 100 entries |

Adjust based on your server performance and how much history you need to view.

***

## Self-Check Checklist

* [ ] Code added via Custom Dashboard OR functions.php
* [ ] Limit value set appropriately for your Dashboard size
* [ ] Changes saved
* [ ] Overview page loads faster

***

## Related Resources

* [Optimize Dashboard for Shared Hosting](https://docs.mainwp.com/dashboard/overview/how-to-optimize-your-mainwp-dashboard-for-shared-hosting.md) - Performance tips
* [Hide Widgets](https://docs.mainwp.com/customization/can-i-hide-widgets-that-i-dont-need.md) - Remove unused widgets
* [Custom Dashboard Extension](https://docs.mainwp.com/add-ons/development/mainwp-custom-dashboard-extension.md) - Extension documentation


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.