In this tutorial on how to customize WordPress website copyright text. By adding custom functionality to our Salient theme we will use the shortcode 2026 to display the copyright year range with the automatically updating current year.
For shortcode 2026 to work we need to add custom code to our Salient Child Theme functions.php file:
/* Current year shortcode for copyright. */
function current_year() {
$year = date('Y');
return $year;
}
add_shortcode('year', 'current_year');
Once this is done and all is saved successfully we can add this part to the Footer copyright widget area with the help of the HTML code widget:
Copyright © 2019-2026 Melderis – Web Building Academy.
<br><div style=”font-size:12px;line-height:1.6em;padding-top:8px;”>As an Amazon Associate We earn from qualifying purchases.</div>