Simple solution to replace the default Reign theme site loader with your custom GIF animation.
Add this code to your child theme's functions.php file:
<?php
// Copy the code from reign-custom-loader-simple.php here- Go to Appearance > Customize > General > Layouts
- Toggle "Site Loader" to ON
- Save changes
In the code, find this line and replace with your GIF URL:
// CHANGE THIS: Set your custom GIF URL here
$custom_gif_url = 'https://demos.wbcomdesigns.com/wp-content/uploads/2025/09/loading.gif';// Using your own uploads folder
$custom_gif_url = '/wp-content/uploads/2024/my-loader.gif';
// Using child theme folder
$custom_gif_url = get_stylesheet_directory_uri() . '/assets/loader.gif';
// Using external CDN
$custom_gif_url = 'https://your-cdn.com/loader.gif';Find this line and adjust the max-width:
style="max-width: 150px; height: auto;"Example: Change to 200px for larger loader
Find this line and adjust the milliseconds:
}, 500); // Change 500 to your desired time in millisecondsExample: Change to 1000 for 1 second minimum display
- β¨ Simple one-file solution
- π― Uses theme's existing loader settings
- π¨ Respects background color from customizer
- π± Mobile responsive
- β‘ Smooth fade-out animation
- π§ No plugin required
| Issue | Solution |
|---|---|
| Loader not showing | Check if "Site Loader" is enabled in Customizer |
| GIF not displaying | Verify the GIF URL is correct and accessible |
| Loader stays too long | Check browser console for JavaScript errors |
| Too big/small | Adjust the max-width value in the code |
- Keep GIF file size under 100KB for best performance
- Recommended GIF dimensions: 100-200px width
- Test on mobile devices for responsiveness
- Use transparent background GIFs for best results
The code includes a sample GIF from WBComDesigns demo:
https://demos.wbcomdesigns.com/wp-content/uploads/2025/09/loading.gif
Remember to replace this with your own GIF URL!
For help with Reign theme: WBComDesigns Support