• Resolved thewebscaper

    (@thewebscaper)


    I can’t be the first person to ask this question, but I tried searching Codex and these forums, but did not find an answer…

    In my footer I want to put my copyright statement but instead of typing the year “2009” I want to have it dynamically pull in the current year and display it. I do this all the time on my non-WP sites (Windows/ASP code) and I am sure there’s an equivalent, I just can’t seem to find it.

    Any help would be much appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter thewebscaper

    (@thewebscaper)

    My apologies, a Google search turned up my answer, and yes it’s me being rookie to PHP. Should anyone else ever need the answer, you simply add ‘<?php echo date(“Y”) ?>’ to the html in place of your year.

    MichaelH

    (@michaelh)

    In your theme’s footer.php

    <?php
    echo 'the current year is '. date('Y');
    ?>

    MichaelH

    (@michaelh)

    Oops, see you got caught by Akismet for some reason. Thanks for the feedback.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Display year question’ is closed to new replies.