Pro: Footer Builder breaks with Date Script

We’re using this as a second bar to add the copyright line since it appears whenever we enable the custom footer it overwrites the previous copyright field in the Theme Settings.

When adding it, getting the above. Saved, refreshed page in browser, it will show until you enter into any Bar and it immediately just show the “2017” white screen.

We can temporarily just insert the date until we’re finished with the Footer and swap it back, but is there any long term solution or better way to execute what we’re going for?

Thanks!

Hi there,

I suggest that you use external Javascript code for that. To do so you can add the HTML code and set the date section empty with an ID that later you can access. For example:

<p>© Copyright <span id="copyrightdate">&nbsp;</span> . All Rights reserved.</p>

Then go to Pro > Theme Options > JS and add the code below:

var theDate = new Date();
var theYear = theDate.getFullYear();
jQuery('#copyrightdate').text(theYear);

That will do the trick. Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.