• Closed
  • Mark Leder
    Spectator
    September 20, 2018 at 3:51 am #40031

    Right now, I have this placed in the footer, using the Evolve Theme customizer:

    Copyright © 2007 – 2018. All Rights Reserved Worldwide.

    But the customizer only allows some html.
    I want the current year to be updated by either js or php.
    I’ve tried directly pasting in js and/or php, and even calling a custom shortcode [year] without success.
    I am using a child theme for Evolve, and have familiarity with functions.
    How can I make this work?

    Roman
    Spectator
    Posts: 3147
    September 20, 2018 at 5:36 pm #40034

    In the theme customizer footer area is not possible to add a dynamic PHP code to display the year as the text/textarea field save and read values from database. What you could try is to enable footer widgets and install a PHP code widget, e.g. https://wordpress.org/plugins/php-code-widget/ and insert the PHP code there, so it will work for sure 😉 Another way is to create a child theme and insert the PHP code in its footer.php file. PHP code to display current year is:

    <?php echo date("Y"); ?>