Converting Static Site to WordPress – Dividing of code

Copy all the code from the index.html file into the index.php file.

Create the following files : footer.php, header.php and sidebar.php and divide up the code within the index.php into these different files.

Header Code

Remove all the code in the index.php file from the top of the file to the body tag and place this in the header.php. To make it dynamic and so the code can still be found enter the following code in its place:

 

 

Footer Code

Remove all the code in the index.php file from the bottom of the file to the top of the footer section and place this in the footer.php file. To make it dynamic and so the code can still be found enter the following code in its place:

Advertisements