Year Shortcode For WordPress

Here is to show year in your WordPress just copy paste this code to your theme function.php file

function year_shortcode() {
$year = date(‘Y’);
return $year;
}
add_shortcode(‘year’, ‘year_shortcode’);

now Use [year] in your posts.