Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

use wordpress functions in external php file

//add to the file that needs to use wordpress functions.
require_once("../../../../wp-load.php");
//or
require_once(rtrim($_SERVER['DOCUMENT_ROOT'], '/') . '/wp-load.php');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #wordpress #functions #external #php #file
ADD COMMENT
Topic
Name
6+4 =