Unlike the previous method where you needed to use Elementor Pro, in this tutorial you can create a preloader in the free version of Elementor without having to use addon plugins or other additional plugins.
However, because the free version of Elementor cannot create header templates, you will need to create a preloader on each page one by one.
How to Create a Preloader in Elementor Without Addon Plugins
Before we dive deeper, this tutorial uses WordPress 6.72 and Elementor 3.27.6. If you are using a different version, the interface might look slightly different, but the basic steps remain the same.
1. Create a New Container
Make sure you are on the page edit screen using Elementor, then you can add a new container at the very top or bottom.
Once you have created the container, open the Advanced tab, then fill in the CSS-ID with wpg-preload
2. Add an Image
Now you can add the image you want to use as a preloader. For this image, it is recommended to use an .svg or .gif file so that it will have animation.
If you have not prepared a preloader, you can find free preloaders here: https://www.svgbackgrounds.com/elements/animated-svg-preloaders/
When adding an animated image, it might be full width, so you need to adjust the image size to make it look better.
3. Adjust the Image Size
Although there is an Image Resolutionoption, this usually has no effect if you are using an .svg image, so to change the image size, you can open the Style tab and then adjust the widthnumber, for example here to 22
4. Add Custom HTML
Now you can add an HTML element below the image you just added, then fill it with the following code
<script> document.addEventListener('DOMContentLoaded', function () { setTimeout(function () { document.getElementById('wpg-preload').style.display = 'none'; }, 2000); });</script><style>#wpg-preload { position: fixed; top: 0; left: 0; min-height: 100vh; width: 100%; height: 100%; background: #fff; z-index: 9999;}</style>Once you have added the code above, all content will automatically be covered by the preloader like this
5. Adjust the Preloader Position
Now you can further adjust the preloader position so that it is in the center of the page by clicking on the image element, then opening the Advanced tab. There you can adjust the Margin and Padding so that the preloader is in the right position. It is recommended to use percentage values so you do not need to use high numbers for margin or padding.
Once adjusted, you can save or publish the page you have created.
5. Check the Results
After publishing, you can access the page you created, and if successful, the result will look like this
That is an easy way to create a preloader in Elementor without other addon plugins. However, as mentioned at the beginning, because the free version of Elementor does not allow you to create header templates, you must create the preloader manually on every page where you want to add one.
COMMENTS
Loading...