• Hi all I have this code in functions.php but why doesn’t it show the year?(it is blank) Thanks
    $default_footer_content = "<a href='#'>Contact Us</a> | <a href='#'>Terms of Use</a> | <a href='#'>Trademarks</a> | <a href='#'>Privacy Statement</a><br />Copyright <?php echo date("Y") ?> © ".get_bloginfo('name').". All Rights Reserved.";

Viewing 2 replies - 1 through 2 (of 2 total)
  • you are mixing php code and echo within a string;

    try:

    $default_footer_content = "<a href='#'>Contact Us</a> | <a href='#'>Terms of Use</a> | <a href='#'>Trademarks</a> | <a href='#'>Privacy Statement</a><br />Copyright ".date('Y')."  © ".get_bloginfo('name').". All Rights Reserved.";
    Thread Starter Copywrite

    (@copywrite2012)

    Thanks for the explanation alchymyth works great now

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Code for year not showing’ is closed to new replies.