fbpx

13 Apr /Bootstrapping WordPress

Posted by Dom Miller

Today I came across a situation where I needed to use the wordpress core but did not need the theme as the project had a separate framework for the front end.  To accomplish this you can add the following code to your php file:

<?php
    /** Must be false to disable template! */
    define('WP_USE_THEMES', false);

    /** Loads the WordPress Environment */
    require ('./wp-blog-header.php');

TAGS: