Themes On PHP Pages

Rate this tutorial:

Once you change your blogging system to WordPress you’ll realize that your .PHP pages will not work. Follow this tutorial to learn how to change them so they will work while having your pages saved in the .PHP format.

Step 1: Changing Your Current PHP Includes

Your current pages and PHP includes probably look something like this:
<?php include("header.php"); ?>
This is where your conent goes
<?php include("footer.php"); ?>

Instead, you’ll want to replace it with the following:
<?php require('/YOURABSOLUTEPATH/wordpress/wp-blog-header.php'); ?><?php get_header(); ?>
This is where your conent goes
<?php get_footer(); ?>

Step 2: Finding Your Absolute Path

You’ll notice that it asks you for your absolute path. If you don’t know your absolute path, simply copy and paste the following code onto a blank notepad page and save it as path.php; upload it to your FTP. Next go to http://yoursite.com/path.php and it will appear. It should look something like this: /home/USER/public_html, add it where it says ‘yourabsolutepath’

<?php echo $_SERVER['DOCUMENT_ROOT']; ?>

Remember to change /wordpress/ accordingly; meaning change WordPress to the name of your WordPress folder: /YOURABSOLUTEPATH/wordpress/wp-blog-header.php.

For further assistance: Contact Me » Ask Me