Every year I need to update the copyright notice on my blog, and every year I forget where to do it in the theme for the site.
I should use a dynamic copyright date, as suggested by James Bavington (@jamesbavington):
@markwilsonit pop this on Mark <?php echo date(“Y”) ?>
— James Bavington (@jamesbavington) January 6, 2014
Or perhaps this more elegant solution highlighted to me by Garry Martin (@garrymartin) but my late night coding changes just broke my blog, so I did it the old way. Whilst I was at it, I applied an updated version of the theme, so this post is more of a “note to self” of the things I need to change when theme updates come along:
- Include the various items in the header.php file that are needed for Google (and others) site verification, Google Analytics, Facebook Like button, Google+ badge, better search results, etc.
- Put back in the style.css stylesheet amendments that adjust colours, etc.
- Edit the functions.php file to make sure that the footer_link() function has the correct attribution and copyright notice…
I’m now using the Insert Headers and Footers plugin for the custom header code and a change of theme has let me insert the PHP I really wanted in footer.php (as, unfortunately, the plugin doesn’t place the text where I want it in the footer). For future reference that code is
This work is © Mark Wilson 2004-, All Rights Reserved.
. Website verification is now handled in the WordPress Tools configuration, and Google Analytics via the Google Analytics Dashboard for WP plugin.