Thord Daniel Hedengren - Smashing WordPress_ Beyond the Blog-Wiley (2014)

(avery) #1

CHAPTER 4 • WordPress Theme Essentials 77






There’s not much to do here. You’ve got another menu that you want to make user-editable
with wp_nav_menu(), just like in header.php, and there’s the copyright text to take into
account. Finally, you want to wrap up everything with wp_footer() just before the
closing body tag, just as you did with wp_head() before the closing head tag.


The following is the code with these things added, along with a simple echo of the year using
regular ol’ PHP for the copyright text:





Copyright ©







// Wrapping up WordPress just before the closing body tag
wp_footer();
?>


The menu feature needs to be taken care of in functions.php, so you’ll just let that one slide for
now. There really is just one thing I want to talk about briefly here, before you move on to
more interesting things, and that is the whole copyright thing. I put it there just to show how
it could work, but if you release a theme, do keep in mind that not all people will want that. In
fact, they might want to offer their content free for anyone to use or license it using any of the
Creative Commons (http://creativecommons.org) licenses. The best solution is a
theme setting for this, something you’ll get to later in this book. Just something to keep in
mind for now.

Free download pdf