Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › Custom page loader not working
Tagged: page loader
- This topic has 12 replies, 2 voices, and was last updated 6 years, 4 months ago by Diana.
Viewing 13 posts - 1 through 13 (of 13 total)
-
AuthorPosts
-
August 3, 2018 at 3:33 am #171244hilmanfSpectatorI 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 thisAugust 3, 2018 at 9:13 am #171294DianaParticipant@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 functionAugust 3, 2018 at 4:39 pm #171361hilmanfSpectatorHi 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?August 4, 2018 at 12:21 pm #171418hilmanfSpectatorOr you can tell me where WPLMS stores page loader 1 and 2 image so I can replace them with mine.August 6, 2018 at 5:36 am #171480DianaParticipant@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; }August 6, 2018 at 10:56 am #171524hilmanfSpectatorThank you very much, Diana. The loader image successfully loaded. But the page was not loaded. It was white blank. Please enlight.August 7, 2018 at 6:40 am #171604DianaParticipant@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.August 9, 2018 at 11:54 am #171943hilmanfSpectatorAll pages. I can't share the page URL since I removed the code to make my site working. Would you please recheck your code?August 10, 2018 at 7:54 am #172047DianaParticipant@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 credentialsAugust 10, 2018 at 5:58 pm #172119hilmanfSpectatorThis reply has been marked as private.August 13, 2018 at 5:44 am #172224DianaParticipantThis reply has been marked as private.August 13, 2018 at 7:03 am #172229hilmanfSpectatorDiana, 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.August 13, 2018 at 9:15 am #172238DianaParticipant@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
-
AuthorPosts
Viewing 13 posts - 1 through 13 (of 13 total)
- The topic ‘Custom page loader not working’ is closed to new replies.