To insert code in a forum thread or comment wrap it in code tags: <code>...</code>.
php in Copyright Footer Text
  • Is it possible to use php in the footer text. I have tried to use one of the php plugins , but the php is not being parsed and it just appears as code in the output.

    I would like to include the year in the Copyright text and want to make it dynamic, so that it changes automatically each year.

    Copyright (<?php echo date('Y'); ?>) Barry Dalrymple | All Rights Reserved.

    Any solution would be appreciated.

  • 3 Comments sorted by
  • Hi Smitp11,

    You can edit on 'striking/footer.php'

    Locate line 129.

    Change the code blow

    <div id="copyright"><?php echo wpml_t(THEME_NAME, 'Copyright Footer Text',stripslashes(theme_get_option('footer','copyright')))?></div>


    To

    <div id="copyright">Copyright (<?php echo date('Y'); ?>) Barry Dalrymple | All Rights Reserved. </div>


    Regards,
    KaptinLin
  • Thanks, I ended up using:

    <div id="copyright">Copyright (<?php echo date('Y'); ?>) <?php echo get_bloginfo('name'); ?> | All Rights Reserved. </div>

    so the Site name is also dynamic.
  • From one Canadian to another (I am Canadian although most of the Websys team is not, and not even in Canada), COOL!
This discussion has been closed.
All Discussions