Year Shortcode

0
0

For the functions.php file:

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

#Usage

Use [year] in your posts.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.