Wordpress LScache Plugin: How do I exclude JS on the home page?
So I have some JS put onto my homepage via elemntors HTML element, see below for example. Now when I enable JS minify and Combine, that custom code doesnt work. How can I exclude this code? : ` function getTimeRemaining(endtime) var t = Date.parse(endtime) ? Date.parse(new Date()) var seconds = Math.floor((t / 1000) % 60) var minutes = Math.floor((t / 1000 / 60) % 60) var hours = Math.floor((t / (1000 60 60)) % 24) var days = Math.floor(t / (1000 60 60 24)) return total: t, days: days, hours: hours, minutes: minutes, seconds: seconds ` I also have a small bit of JS in my functions.php file which also breaks when enabling. Hi, you can extract a piece of the code , like one word or one line , and put it in Page optm -> tune setting -> JS exclude , and save , purge all best regards, Thank you for the quick reply. I have tried but its not working still. Ive tried adding: function getTimeRemaining(endtime) function getTimeRemaining getTimeRemaining And the same for each function, but its still not showing. Also what about JS in my JS in my functions.php file? Here is my code: function getTimeRemaining(endtime) var t = Date.parse(endtime) - Date.parse(new Date()) var seconds = Math.floor((t / 1000) % 60) var minutes = Math.floor((t / 1000 / 60) % 60) var hours = Math.floor((t / (1000 60 60)) % 24) var days = Math.floor(t / (1000 60 60 24)) return total: t, days: days, hours: hours, minutes: minutes, seconds: seconds function initializeClock(id, endtime) var clock = document.getElementById(id) var daysSpan = clock.querySelector(.days) var hoursSpan = clock.querySelector(.hours) var minutesSpan = clock.querySelector(.minutes) var secondsSpan = clock.querySelector(.seconds) function updateClock() var t = getTimeRemaining(endtime) daysSpan.innerHTML = (0 + t.days).slice(-2) hoursSpan.innerHTML = (0 + t.hours).slice(-2) minutesSpan.innerHTML = (0 + t.minutes).slice(-2) secondsSpan.innerHTML = (0 + t.seconds).slice(-2) if (t.total