How get Year Shortcode for a wordpress website?
For the functions.php file:
function year_shortcode() {
$year = date('Y');
return $year;
}
add_shortcode('year', 'year_shortcode');
Usage
Use [year] in your posts.
by Subbu · Published · Updated
Tags: Year Shortcode for a wordpress website
by Subbu · Published March 5, 2013
by Subbu · Published April 24, 2013
by Subbu · Published September 14, 2013
More