Home Forums WoodMart support forum Footer Copyright

Footer Copyright

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #165724

    hbbhome
    Participant

    Hello,
    We want to update the year automatically at the bottom of our page. I added the sample script, but you didn’t work. What should I do?

    Exp:<script>document.write(new Date().getFullYear());</script> 

    #165745

    Hello,

    If you want to add dynamic year in your 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.

    #165857

    hbbhome
    Participant

    thank you so much.

    #165870

    Most Welcome!!!..

    Well, hbbhome!.., it’s been great chatting with you! I hope I resolved your issues thoroughly.

    Let us know if there’s anything else we can do for you! You can always reach us at any time. We are always here to help you.

    Have a wonderful day.

    Topic Closed.
    Best Regards.

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

The topic ‘Footer Copyright’ is closed to new replies.