i am trying to create a custom wordpress page so that i can load data from ajax call and can use wordpress functions in that file . the problem is even after including all the right file required for custom wordpress php file its giving me error of
Fatal error: Call to undefined function wp_get_current_user() in /web/sites/meta/mormonrod.com/wp-includes/capabilities.php on line 1281
I followed the steps in this question too (Using WPDB in standalone script?) which included these files
$path = $_SERVER['DOCUMENT_ROOT'];
include_once $path . '/wp-config.php';
include_once $path . '/wp-load.php';
include_once $path . '/wp-includes/wp-db.php';
include_once $path . '/wp-includes/pluggable.php';
but still i have that error showing up and which does not lets the ajax call to be completed .