This will be about the simplest footer ever on a site. It will be a copyright symbol with Jeff’s name (It’s always nice, I think, to have the name of the site in the footer in plain text for easy copy-and-paste) and social media links. The year will auto update so it never looks out of date.
<footer class="site-footer"> ©<?php echo date('Y'); ?> Jeff Campana - <a href="https://www.facebook.com/JeffCampanaCeramics">Facebook</a> - <a href="https://twitter.com/jeffcampana">Twitter</a> </footer>
This goes in the footer.php file that gets included on every page of the site. This file is also useful for closing up any lingering open tags (e.g. if we opened any in header.php) and analytics scripts.
Hi Chris, I’ve started using this PHP snippet, a truly use and forget copyright :)
© Copyright <?php
$then = 2007;
$now = date('Y');
if ($then == $now)
echo "$then - $now"; ?>
Hi all. I am new to PHP and I know using Copyright © will give you an auto year so you don’t have to change things every year which is great. Is there a code for doing the same thing using roman numerals? It’s something you don’t see and I’d like to use it if it’s possible to do so. Thank you in advance.