Load WordPress outside of WordPress

So simple.

include('wp-load.php');

Or whatever the path is to where your WordPress core files live.

Then query away!

So, in it’s simplest page form, it would look something like:

include('wp-load.php');

get_header();

// display the site's title
$title = get_bloginfo('name');
echo '<h1>' . $title . '</h1>';

get_footer();

 

Leave a Reply

Your email address will not be published. Required fields are marked *

− 1 = 2