There is no doubt that our media pages will have headers and footer, which are almost identical in content.
From scratch, we do not consider the following may use the search and comment templates, and later I will be appended to the last side of the text.
Before we started, we copied all the static files used in the template to the theme root directory than the slices, css,js, etc., or the subsequent work could not continue.
1. Header
The header is the public part of each page, specifically how, here do not repeat, directly copied to the Header.php modified content as follows
<!doctype html>Here we need to note that JS and CSS path problem, this kind of direct operation will certainly be wrong, because the path of the site is the path of WordPress and not your theme of the path.
We can get the path of the topic through the Bloginfo function.
Blog_info (' Template_url ');
For example, we call base.css in the CSS directory, and the other files are the same
<link href= "<?php bloginfo (' Template_url ');? >/css/base.css" rel= "stylesheet" >
2, footer
The same as the header, first copy the bottom public code to footer.php, modify the content to the way you want
<footer> <p>design by <a href= "https://www.jerryqi.cn" target= "_blank" > Zi Jianwei personal blog </a> < A href= "http://www.miitbeian.gov.cn/" > Xiang ICP 备 17,016,214th # -1</a></p></footer><a href= "#" class= "Cd-top" >Top</a></body>
At this point, the most simple changes to the header and footer have been completed, now he can be successful for the page call, after the modification of hyperlinks and the task of adding hooks, we put in the back to use the time to do.
To develop your own WordPress blog Theme from scratch---Preparation of local templates