Make the MainWP admin be the start page

I’ve followed the instructions here but it tells me

Your PHP code changes were not applied due to an error on line 1 of file wp-content/plugins/mainwp-custom-dashboard-extension/class/mainwp-custom-dashboard.class.php(68) : eval()'d code. Please fix and try saving again.

Cannot redeclare admin_default_page() (previously declared in wp-content/themes/hello-elementor/functions.php:232)

Any ideas?

1 Like

This file doesn’t have 232 lines in the latest version, so it looks like you added the code at yourself at the end of that file. You shouldn’t, because it gets overwritten with the next update.
Remove it there and put the code in the code snippet in the Custom Dashboard Extension as instructed. Then it should work.


Hi @trident

As @josklever suggested, please remove the code from the functions.php file and try adding it using our Custom Dashboard extension.

Let us know if that helps.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.