I am trying to use a gif as preloader in wordpress. I want this gif to show exactly 5 seconds. I have found ways to do that in html/css/js but could not find how to do that in WordPress. I have found several plugin related to this but none of it really meets my requirement. Can anyone please help me here?
I am trying to use a gif as preloader in wordpress. I want this gif to show exactly 5 seconds. I have found ways to do that in html/css/js but could not find how to do that in WordPress. I have found several plugin related to this but none of it really meets my requirement. Can anyone please help me here?
Share Improve this question asked Jan 15, 2019 at 7:37 rizbanul hasanrizbanul hasan 1 4- 1 You want your site to take 5 seconds to load? Why on earth would you want that? – Jacob Peattie Commented Jan 15, 2019 at 7:57
- Its one of the requirements of the client! :( Can you help? – rizbanul hasan Commented Jan 15, 2019 at 8:35
- Fulfilling this request would be doing them a disservice. 40% of visitors will leave a website if it doesn't load in 2 seconds, allegedly. Are you sure you're not misinterpreting them? – Jacob Peattie Commented Jan 15, 2019 at 8:39
- Yes. They gave a gif and asked to show its full length. Well, length can be reduced. But can you tell me how to do it? – rizbanul hasan Commented Jan 15, 2019 at 9:57
1 Answer
Reset to default -1add your code with class for ex .loading-wrapper in your header then add this code in your script
setTimeout(function(){
$('.loading-wrapper').slideUp();}, 5000);