Skip links
Published on: PHP

How to use wordpress functions in non wordpress sites

Rate this post

If you are looking to use wordpress features (or) wordpress functions in core php sites (or) outside of wordpress now its possible.

By calling wp-load.php file you can access whole wordpress functions.

<?php 
require( '../my-wodpress/wp-load.php' ); 
get_header(); 
echo 'new content outside WordPress'; 
get_footer(); 
?>

The above code will display wordpress header and footer with echo statement.