Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1237025

    Hi

    I had an automatic update of the year in the footer in the copyright field:

    Copyright field:
    © [year] company name | Impressum | Datenschutzerklärung [nolink]

    Modification at the end of file functions.php:
    /* Automatische Aktualisierung der Jahrzahl in der Copyright Zeile */
    function year_shortcode() {
    $year = date(‘Y’);
    return $year;
    }

    Up to Enfold version 4.7.6.1 it worked fine. Since the update to 4.7.6.2, the footer shows the placeholder [year] not the current year.

    I do not use a child theme, and after the update I added the text to function.php manually.

    What has changed, any idea?

    Best regards,
    Andreas

    #1237036

    Sorry to all, my fault. I missed to copy the last line:

    function year_shortcode() {
    $year = date(‘Y’);
    return $year;
    }
    add_shortcode(‘year’, ‘year_shortcode’);

    All is great!

    #1237116

    Hi Andreas,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1243663

    I’m having the same issue. I don’t use a child theme either. I’m not tech-savvy enough to mess with the html. Is there something I could drop into the Quick CSS field under the Theme General Styling?

    #1243829

    Hi kathcom,

    You need to use a child theme, otherwise your changes will be overwritten on updates. After you have a child theme installed then please add the function posted by @Andreas to your functions.php file, then you can add the [year] shortcode to the copyright field.

    Best regards,
    Rikard

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