Archived topic
Error Messages after Niche Import
5 replies · Started by Deyson on January 20, 2022
Hello and good day.
After I imported the Niche Template I am getting PHP errors on 2 different pages.
Please let me know what I should do.
Thank you and have an amazing day! 😊
Hi there,
the Niche site runs some PHP inside the Elements ( found in Appearance > Elements ).
Those errors would mean your site has DISALLOW FILE EDITs set so the PHP won't run. Theres a little more info on that here:
https://docs.generatepress.com/article/disallow-php-execution/
If you want you can tell GP to allow PHP Edits in the Elements module. See here:
https://docs.generatepress.com/article/generate_hooks_execute_php/
Hello, David.
If I understand correctly if I do not see DISALLOW_FILE_EDIT in my wp-config.php file I should then add this Line:
define( 'GENERATE_HOOKS_DISALLOW_PHP', true );
If so, does it matter where I add it in the wp-config.php?
Thank you and have an amazing day! 😊
This doc:
https://docs.generatepress.com/article/generate_hooks_execute_php/
So you add this PHP Snippet to your site:
add_filter( 'generate_hooks_execute_php', '__return_true' );
And this doc explains how to add PHP:
Thank you, David. That did the trick 😊
Thank you and have an amazing day! 😊
Glad to be of help