I'm getting this error on my site all of a sudden and have no idea how to fix it.
Warning: Use of undefined constant core_mods - assumed 'core_mods' (this will throw an Error in a future version of PHP) in /nfs/c10/h07/mnt/144394/domains/nationsfg/html/wp/wp-content/themes/nationsfg/functions.php on line 50
I'm getting this error on my site all of a sudden and have no idea how to fix it.
Warning: Use of undefined constant core_mods - assumed 'core_mods' (this will throw an Error in a future version of PHP) in /nfs/c10/h07/mnt/144394/domains/nationsfg/html/wp/wp-content/themes/nationsfg/functions.php on line 50
Share Improve this question asked Aug 26, 2020 at 0:49 Brandon GilbertBrandon Gilbert 1 1- This is a problem with that line in your theme,. Contact your theme's support area. – Rick Hellewell Commented Sep 25, 2020 at 18:14
1 Answer
Reset to default 0From the provided error, it appears you have added in some custom code to your functions.php file in your theme. Suggest commenting out the last changes you made, but the error is clearly stating that line 50 is the culprit so that would be a good starting point if you're unsure.
If this has happened since updating to WP v5.5 (or a new PHP version on your server) then the code you're using is likely deprecated which may explain why this error is just suddenly displaying.
I wouldn't recommend doing this, but as it's a warning, you could also just turn off wp_debug
(setting to false) at the end of file wp-config.php
. Doing this will only hide the message, it will not fix the issue, and it's possible to turn into something more serious over time.