What You’ll Learn
- Adding custom PHP, CSS, and JavaScript to your Dashboard
- Where custom code is stored and executed
- Handling PHP errors safely
- Accessing example code snippets
Extension Add-on - This add-on provides standalone functionality within MainWP Dashboard. No third-party plugins required.
The MainWP Custom Dashboard Extension is designed to contain your custom snippets for your MainWP Dashboard.
By adding custom snippets to this plugin, you can easily extend your MainWP Dashboard functionality or change the way it looks.

How It Works
MainWP Custom Dashboard Extension saves your custom code to your MainWP Dashboard database instead of containing code in PHP/CSS/JS file. For CSS and JS snippets, the extension will print saved code in the element on your MainWP Dashboard site. Saved PHP Code Snippets will be executed by using the PHP functioneval().
In case the eval() function is disabled on your host, please contact your host support and have them enable it for you.
In case you try to save PHP code with syntax error and cause PHP Fatal Error, the extension uses the wp_php_error_message filter provided by WordPress to prevent your MainWP Dashboard site from crashing.
After saving bad code, you will see the error message and link to go back to fix the code:

Related Resources
- Development Add-ons - Browse all development tools
- Code Snippets Extension - Deploy code to child sites
- Customization Guide - Dashboard customization options