I don’t know if this should be here or in ProWordPress, but I am trying here first.
In the past, I have been able to run small bits of PHP code outside of WP by loading wp-load.php before the code.
For some reason, when I try it now, I get a critical error saying that I can redeclare a function in my functions.php file, because it was already declared in that same functions.php file.
Fatal error: Cannot redeclare Money_Leaderboard() (previously declared in /var/www/vhosts/domainname.com/httpdocs/wp-content/themes/the-league/functions.php:65) in /var/www/vhosts/domainname.com/httpdocs/wp-content/themes/the-league/functions.php on line 65
This would lead me to believe that somehow functions.php is being called twice. How would that happen? Does this make sense as the reason for this error?
The site works just fine. I only get this error when trying to load wp-load.php.