I introduced you to "The whole process of WordPress theme production (5): Making header.php". This article continues to introduce to you how to make footer.php. Let's take a look at it together~
We have already finished the header.php of the blog in the previous section. Today we will make the footer.php together. footer.php is similar to header.php. The purpose of writing this file is also to streamline the code and improve the reusability of the code. The footer code of all pages in the Aurelius theme directory is almost the same, so we will extract these codes and put them in to footer.php.
Create a new file footer.php in the Aurelius theme directory. We extract the footer code in index.php and copy it to footer.php (if you make your own theme in the future, you can decide which ones are footer as needed. Code):
Then use a text editor to open index.php, archive.php, contact.php, full_width.php, page.php and single.php, delete the above similar Change the code to:
Okay, now open your blog homepage and see if the theme we created can still work normally. The answer is yes, it is almost the same as before. The footer is still the same as before. Now add your blog copyright statement information and wp_footer()
function, delete all the code in footer.php and change it to: