• Creator
    Topic
  • #8236

    Chapstick
    Spectator
    Been thanked: 0 times

    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>

Viewing 5 replies - 1 through 5 (of 5 total)
Replies
  • Roman
    Keymaster
    Post count: 2543
    Been thanked: 29 times
    #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
    Post count: 7
    Been thanked: 0 times
    #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
    Keymaster
    Post count: 2543
    Been thanked: 29 times
    #9003 |

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

    agjimmy69
    Spectator
    Post count: 16
    Been thanked: 0 times
    #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
    Keymaster
    Post count: 2543
    Been thanked: 29 times
    #9237 |

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

Viewing 5 replies - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.