Saturday, December 3, 2022
No menu items!
HomeWordPress ThemesAdd Timer in Download Button Of WordPress

Add Timer in Download Button Of WordPress

Hello, friends two simple steps, you will get it just watch the video and add this script in the footer and then add plugin \”WordPress Shortcodes\” and then follow the instructions on the video.

Here is the script just copy-paste it in footer.php

<script>
var downloadButton = document.getElementById(\”download\”);
var counter = 25;
var newElement = document.createElement(\”p\”);
newElement.innerHTML = \”You can download the file in 25 seconds.\”;
var id;
downloadButton.parentNode.replaceChild(newElement, downloadButton);
id = setInterval(function() {
counter–;
if(counter < 0) {
newElement.parentNode.replaceChild(downloadButton, newElement);
clearInterval(id);
} else {
newElement.innerHTML = \”You can download the file in \” + counter.toString() + \” seconds.\”;
}}, 1000);
</script>

and after adding it the next step is to create a button in the classic editor and then add this command in the button after space

watch the complete video then you will know how you can change the timmer and text each and every thing thank you

RELATED ARTICLES
- Advertisment -

Most Popular

Recent Comments