I’m writing code in a kind-of standalone PHP file outside of a WP plugin.
How can I get access to $wpdb so that I can query the WP database?
$wpdb->get_results() is giving me …
Fatal error: Call to a member function on a non-object
I have even …
include_once(‘wp-config.php’);
include_once(‘wp-load.php’);
include_once(‘wp-includes/wp-db.php’);
in top of PHP file.