|

How To Add A Dynamic Copyright Year in Divi Footer Bottom Bar

The Divi Bottom Bar, located just below the WordPress footer, is a perfect place for Copyright © 2019 information. If you do not want to add a dynamic year, it is easy enough to just edit the text in the Theme Customizer by editing the Footer->Bottom Bar->Edit Footer Credits field. But every year you have to manually edit that year so that it will reflect the current year. If you don’t do that, your visitors will notice it and feel that it’s an out dated site with no maintenance. So why not create an automatic feature that keeps the year fresh for you – year after year? Just follow the step-by-step guide below and stop worrying about outdated WordPress footers.

Let’s dive in!

The easiest way to use a dynamic year in your Divi Footer copyright section is to use a small Javascript code snippet. Divi makes that super easy. Here’s how:

Navigate to Divi->Theme Options in your dashboard.

Paste the following code under the “Integration” tab in the header code section.

<script>
// Add A Dynamic Year In Divi Footer Copyright
 var beg_year = 2018; // Year site went live
 var this_year = new Date(); // Get current date
 var copyright_text = ' Company Name | All Rights Reserved ';
 var developed_by = '| Made with <span id="icon-love" class="et-pb-icon et-waypoint et_pb_animation_top et-animated"></span> by <a href="https://yourdomain.com" target="_blank">Your Company Name</a>'; // Developer info
 this_year = this_year.getFullYear();
 if(this_year > beg_year) {
 var year = beg_year + ' - ' + this_year;
 } else {
 var year = this_year;
 }
 jQuery(function($){
 $('#footer-info').html('© ' + year + ' ' + copyright_text + ' ' + developed_by );
 });
</script>

Obviously you are going to want to use your domain and text to specialize the output for your needs.

After you have clicked “Save” in the Divi Theme Options panel, return to the front-end of your website, and you will notice that the footer has been updated.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

10 Comments

  1. That’s a great help Tawfiqur! I also used the other trick to shrink the huge heart icon and now I have a beautiful red heart there.

    The only thing is that… when I view it on a desktop screen, it’s not aligned to the middle, but when I switch to a tablet or phone view, it’s in the middle.

    Is there a way to make sure the customized footer credit always in the middle? Thanks again.

    1. Never mind! I found the following code online and when they are copied/pasted into Custom CSS, it works:

      #footer-info
      {
      float: none;
      padding-bottom: 10px;
      text-align: center;
      }

  2. Best tutorial around! There is so much I have been able to do with the bottom bar now. Just needed a starting point to edit my customers’ sites. Now I just need to find time to finish mine—someday.

  3. Really useful, many thanks Tawfiqur
    Could you let me know how to add a link to a Privacy Policy page too? I tried adding another line with the link but it doesnt show on the footer?
    🙂