Beaver Themer – How to add a programmed copyright date and symbol
Author:
David Waumsley
Description:
By default the Themer template uses this HTML character: © to show the copyright symbol, but depending on font the position can be a little of line.
Below I’ve swapped it out with the one over a Font Awesome:
<i class=”fa fa-copyright” aria-hidden=”true”></i>
You can see the difference between the symbol above in the image and below in the actual footer. You can change the size of the symbol without custom CSS with example shown here.
But for the best accessibility it is better to add this below as screen readers will not see the icon. (© is a safe symbol for screen readers).
<i class=”fa fa-copyright” aria-hidden=”true”></i><span class=’screen-reader-text’style=”position: absolute !important; left:-9999px; top:-9999px;”>Copyright</span>
Notation of the shortcode is without * ([currentyear])
Kind:
PHP, Beaver, Shortcode
PHP:
// Shortcode for the copyright year below.
function currentyear_shortcode() { $year = date('Y'); return $year; }
add_shortcode('currentyear', 'currentyear_shortcode');
Shortcode:
[*currentyear]
URL:
- https://www.youtube.com/watch?v=tADRJKthAW0&feature=youtu.be
- https://themer.beaverjunction.com/footer-example/