Home Forums WoodMart support forum Display Current Year in Footer

Display Current Year in Footer

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #156300

    sbwcws
    Participant

    Hello – How can I dynamically show current year in footer, So I dont have to change it every year manually

    ©2019 My Company .

    #156319

    Hello,

    Unfortunately there is no such option in the theme to use dynamic copyright.

    You can read and follow the below article that might help you out:
    https://www.wpbeginner.com/wp-tutorials/how-to-add-a-dynamic-copyright-date-in-wordpress-footer/

    Best Regards.

    #165606

    sbwcws
    Participant

    There is a way to do this as mentioned here as your above method just don’t work.

    https://www.sohaib.com/how-to-add-year-which-changes-dynamically-in-woocommerce-or-wordpress/

    #165688

    Hello,

    To display the dynamic year in footer you can use the below code in function.php :

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

    After placing the above code you have to use this short code “[year]” inside “Copyrights text” area, under theme settings >> Footer.

    Screenshot for clarification: https://jmp.sh/sUKHtFb

    I have tested this code on my test site and it works just perfectly fine on my test site.

    Best Regards.

    #570487

    dynamo-models
    Participant

    Thanks for this tips guys, it works perfecctly for me.

    One question : it is not possible to add this code in the functions.php of the child theme. So does the code stay after a Woodmart theme update ?

    Thanks,

    #570531

    Hello,

    Yes, you can add the code to the functions.php of the child theme. This way, the code will stay intact even after a Woodmart theme update.

    Best Regards.

Viewing 6 posts - 1 through 6 (of 6 total)