Custom page loader not working

Home Forums Legacy Support Support queries How-to & Troubleshooting Custom page loader not working

Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #171244
    hilmanf
    Spectator
    I tried to activate my site custom page loader with code you provide on other thread. I put it on WPLMS Customizer plugin and disable page loader from WPLMS panel. It's failed. My code is below.   add_action('wp_head','add_custom_pageloader'); function add_custom_pageloader(){ ?> https://arkademi.com/wp-content/uploads/2018/08/Arkademi-GIF-Loader.gif <?php }   Need help to fix this
    #171294
    Diana
    Participant
    @hilmanf, It is not working because it is not a correct code. Try this, add_action('wp_head','hook_javascript'); function hook_javascript() $output="<script> alert('Page is loading...'); </script>"; echo $output; }   You cannot add the gif link like this. You have to add the whole HTML inside the function
    #171361
    hilmanf
    Spectator
    Hi Diana, I am not sure about 'You have to add the whole HTML inside the function'. But I tried to put the GIF into HTML like this: < p >< img src= "https://arkademi.com/wp-content/uploads/2018/08/Arkademi-GIF-Loader.gif" alt="" />< /p > Is that correct HTML code? What should I do now? How may I add it to the code?  
    #171418
    hilmanf
    Spectator
    Or you can tell me where WPLMS stores page loader 1 and 2 image so I can replace them with mine.
    #171480
    Diana
    Participant
    @hilmanf, Apologies for the delayed response here.... Please try this code and paste in the wp-admin > Plugins > Editor > Select WPLMS Customizer Plugin > wplms-customizer.php add_action('wp_head','hook_javascript'); function hook_javascript(){ $output="<script> $(window).load(function() { $('.loader').fadeOut('slow'); }) </script>"; ?> <style> .loader { position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; z-index: 9999; background: url('https://arkademi.com/wp-content/uploads/2018/08/Arkademi-GIF-Loader.gif') 50% 50% no-repeat rgb(249,249,249); } </style> <div class="loader"></div> <?php echo $output; }
    #171524
    hilmanf
    Spectator
    Thank you very much, Diana. The loader image successfully loaded. But the page was not loaded. It was white blank. Please enlight.
    #171604
    Diana
    Participant
    @hilmanf, I checked this on my test setup before sharing it with you. Can you please share the page URL on which page it is causing this issue.
    #171943
    hilmanf
    Spectator
    All pages. I can't share the page URL since I removed the code to make my site working. Would you please recheck your code?
    #172047
    Diana
    Participant
    @hilmanf, I need your FTP credentials to check the code working on your site because it is working fine at my end. P.S. Mark your reply as private while sharing the credentials
    #172119
    hilmanf
    Spectator
    This reply has been marked as private.
    #172224
    Diana
    Participant
    This reply has been marked as private.
    #172229
    hilmanf
    Spectator
    Diana, you're the best! Thank you very very much. If I want to go back to default page loader, so I need to switch 'Page Loader' option on WPLMS and delete the code inside WPLMS customizer, Don't I? You may please close the topic.
    #172238
    Diana
    Participant
    @hilmanf, Exactly..!! you have to comment out the code and enable the loader from vibe options panel. Thank you so much for appreciation. Closing this topic
Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Custom page loader not working’ is closed to new replies.