I’m trying to load the WordPress core into my own separate script using:
define('WP_USE_THEMES', false);
require('../wp-blog-header.php');
However, the theme doesn’t seem to like this and ends up erroring out as seen in the screenshot below. Any idea what is going wrong?
Hi ryanmortier!
I’m not really sure why you would want to do that. I would try asking on the WordPress support forums, https://wordpress.org/support/. Since it’s more of a general WordPress question they will be able to help you out better.
Regards,
Elliott
Thanks, I ended up fixing it myself. The problem was the include code couldn’t be called within a function.