Logo Logo Logo Logo Logo
  • Work Overview
  • Code Snippets Central
  • About
  • Contact
  • Work Overview
  • Code Snippets Central
  • About
  • Contact
Back to all articles →

Topic: Actions and Filters / Functions PHP File / Wordpress

01 Apr Add Year shortcode to footer copyright notice to automatically update.

Posted at 18:33h in Actions and Filters, Functions PHP File, Wordpress by Atkinson
//Add to functions.php
function year_shortcode() {
  $year = date('Y');
  return $year;
}
add_shortcode('year', 'year_shortcode');

Thanks to CSS Tricks!



Facebook • Instagram • Dribbble • Twitter • LinkedIn
Copyright © Janet Atkinson 2023. All Rights Reserved.
Images and/or Artwork may not redistributed, reproduced, or republished without prior written permission.


For fine art painting and other personal work by Janet Atkinson please visit janetatkinsonstudio.com