Latest TweetsI ️ getting awesome reviews for my free #WordPress #plugins :) m0n.co/wp-plugins pic.twitter.com/DYvs381tFb
Perishable Press

Execute External WordPress Functions

To execute WordPress functions in an external directory (i.e., outside of the WordPress install directory), it is necessary to include a call to wp-blog-header.php at the top of the external file.

For example, if your WordPress-powered blog is located in a subdirectory called “blog” and the external file is in the domain root (e.g., the external file is located directly in http://domain.com/), add the following code to the top of the external file:

<?php require_once("./blog/wp-blog-header.php"); ?>

Alternately, you can do this:

<?php require(dirname(__FILE__) .'/blog/wp-blog-header.php'); ?>

Jeff Starr
About the Author Jeff Starr = Designer. Developer. Producer. Writer. Editor. Etc.
Archives
[ Comments are closed for this post ]