Adding WordPress Header and Footer to a PHP Script

If you want to add WordPress Header & Footer in a PHP script flow those stapes:

Step-1: Upload Your PHP project in the WordPress root folder.

Step-2: Added this code on the PHP script header:

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

Well Done! Now you can use all wp functions in your PHP project, like wp_head(), wp_footer(), get_header(), get_footer(), and more.

Leave a Comment