• Closed
  • Chapstick
    Spectator
    January 18, 2014 at 9:13 pm #8236

    I would like to be able to use the copyright text area in the footer options to add dates using php and am unable. So, I have edited footer.php, which works, but it would be nice if in the next version, that PHP could be allowed in the copyright text area.

    This is how I changed the footer.php:

    <ul class=”copyright”>
    <li>© 2005-<?php echo date(“Y”) ?> <?php echo $data[‘footer_text’] ?> </li>
    </ul>

    Roman
    Spectator
    Posts: 3147
    January 19, 2014 at 10:26 am #8998

    I think it will be better to use it as it’s now, because some users will want to not use the date and then will want to remove it in every theme update. it’s better just insert the date manually in the theme option field. PHP cannot be inserted in the theme options field.

    Chapstick
    Spectator
    Posts: 7
    January 19, 2014 at 6:39 pm #9000

    Yes, I could add the year manually, but I don’t want to do that. I want the year to be automatically updated every Jan 1.

    Thank you for the suggestion!

    Roman
    Spectator
    Posts: 3147
    January 19, 2014 at 7:31 pm #9003

    at least you could create a child theme which would use your custom footer http://codex.wordpress.org/Child_Themes

    agjimmy69
    Spectator
    Posts: 16
    March 5, 2014 at 12:39 am #9234

    Hello, you can use this code :

    Code:
    © Copyright 2011-<script language=”javascript”>
    date = document.lastModified;
    an = date.charAt(6)+date.charAt(7)+date.charAt(8)+date.charAt(9);
    document.write(an);
    </script>.

    in the FOOTER OPTIONS\Copyright Text

    it’s work perfectly

    Roman
    Spectator
    Posts: 3147
    March 5, 2014 at 10:01 am #9237

    personally I stay away from the js but thank you very much for this trick 🙂