Title: problem with preloader
Last modified: June 21, 2019

---

# problem with preloader

 *  Resolved [andreaborin](https://wordpress.org/support/users/andreaborin/)
 * (@andreaborin)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/problem-with-preloader/)
 * Hi everyone,
 * I’m experiencing an issue with the preloader image that comes with the Astrid
   theme: after I added some jQuery code in the Hompage, the preloader doesn’t show
   up anymore and when you load the site there’s a bit of confusion. How can I manage
   the time of display of the preloader, in order to hide the Homepage for the right
   time? I think I have to modify a .js file, but don’t know where to find it!
    
   Thanks in advance for your attention!
 * Ab
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproblem-with-preloader%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Kharis Sulistiyono](https://wordpress.org/support/users/kharisblank/)
 * (@kharisblank)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/problem-with-preloader/#post-11661739)
 * Hello there,
 * I checked your site is properly displaying the preloader. To set a custom delay
   time before it disappears, try doing the below steps:
 * 1. Add this CSS code to Appearance > Customize > Additional CSS from dashboard.
 *     ```
       .preloader.preloader-hidden {
         display: block !important;
         opacity: 1 !important;
       }
       ```
   
 * 2. Install and activate the [TC Custom JavaScript](https://wordpress.org/plugins/tc-custom-javascript/)
   plugin
    3. Go To **Appearance** > **Custom JavaScript** 4. Paste the following
   code into the provided box
 *     ```
       (function($){
   
           var preloader = $('.preloader');
           setTimeout(function(){
   
           preloader.remove();
   
         }, 2000);
   
       })(jQuery);
       ```
   
 * 2000 equals to 2 seconds.
 * 5. Update
 * Regards,
    Kharis
 *  Thread Starter [andreaborin](https://wordpress.org/support/users/andreaborin/)
 * (@andreaborin)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/problem-with-preloader/#post-11677545)
 * Hi Kharis Sulistiyono and thank you so much for your answer.
 * The main issue I was experiencing was caused by the lazy load of my images by
   Autoptimize plugin. In fact I was using the same CSS code you posted and tryied
   to add the delay by CSS3 to avoid jQuery. Eliminating the lazy load fixed the
   issue, but now I have to improve my loading speed, because on mobile I only have
   49% at google page speed insights.
    By the way thank oyu so much for your solution,
   that would work perfectly!
 * Ab
    -  This reply was modified 6 years, 11 months ago by [andreaborin](https://wordpress.org/support/users/andreaborin/).
 *  [Kharis Sulistiyono](https://wordpress.org/support/users/kharisblank/)
 * (@kharisblank)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/problem-with-preloader/#post-11677587)
 * You’re welcome!
 * Please let us know in a new topic if you have any further questions, or if we
   can provide you with any other assistance.
 * Regards,
    Kharis aThemes Support
 *  [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/problem-with-preloader/#post-11678149)
 * [@andreaborin](https://wordpress.org/support/users/andreaborin/) maybe try adding`
   Logo-AB-grey.png` to the lazyload exclusion list?
 * hope this helps,
    frank (ao dev)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘problem with preloader’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/astrid/1.20/screenshot.png)
 * Astrid
 * [Support Threads](https://wordpress.org/support/theme/astrid/)
 * [Active Topics](https://wordpress.org/support/theme/astrid/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/astrid/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/astrid/reviews/)

## Tags

 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [js](https://wordpress.org/support/topic-tag/js/)

 * 4 replies
 * 3 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/problem-with-preloader/#post-11678149)
 * Status: resolved