Show the Divi Switch Preloader on All Pages

Written by Dan Mossop

The Divi Switch plugin by Divi Space comes with a range of useful Divi theme customizations. One is the ability to add a pre-loader effect to the homepage, which displays a spinning icon while your page loads.

If you'd like to modify Divi Switch's pre-loaders to work on all pages, you can do so by adding CSS to Divi as follows:

.load-dark:before,
.load-light:before {
    display: block;
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    align-content: center;
    text-align: center;
    line-height: 100%;
    -webkit-animation: curtain 3.5s forwards;
    animation: curtain 3.5s forwards;
}
.load-dark:after,
.load-light:after {
    font-family: "etModules";
    font-size: 3.4em;
    content: "\e02d";
    position: fixed;
    text-align: center;
    left: 50%;
    margin-left: -50px;
    width: 100px;
    top: 45%;
    -webkit-animation: wheel 3s forwards;
    animation: wheel 3s forwards;
}
.load-dark:before {
    background: #303030;
}
.load-dark:after {
    color: #f1f1f1;
}
.load-light:before {
    background: #f1f1f1;
}
.load-light:after {
    color: #303030;
}
Now when you use Divi Switch to switch on either the "Home Page Pre-Loader (Dark)", or "Home Page Pre-Loader (Light)", it'll be applied to all pages on your site.

Smooth Page Transitions for Divi & Extra!

Bring a touch of elegance to your Divi or Extra website with the Divi Transitions plugin. Enjoy seamless fade, zoom, and wipe effects that work smoothly with back button and new tabs. Perfect for creating a refined user experience without slowing down your site.

About Dan Mossop

Dan is a Scottish-born web developer, now living in Brisbane with his wife and son. He has been sharing tips and helping users with Divi since 2014. He created Divi Booster, the first Divi plugin, and continues to develop it along with 20+ other Divi plugins. Dan has a PhD in Computer Science, a background in web security and likes a lot of stuff, 

5 Comments

  1. works great, but I had to change the content tag to "\e02d" instead of "e02d" to show the correct icon.

    Reply
    • Hi Lukas, thanks for that. Yes there should have been a backslash, but it looks like it was getting stripped out. I've updated the post to correct this.

      Reply
  2. It works perfectly, thanks ! Do you know how to change the image of the spinner ? I try to change png in the folder of plugin, but it doesn't work…

    Reply
    • Hi Sylvain, have you tried clearing your browser cache. Your browser will store the image in its cache and avoid reloading it if possible. This means even if you change the image in the folder, you won't see the updated image until the copy in your browser cache expires. Clearing your cache will force it to reload the image and should hopefully make it start displaying the new spinner for you. Let me know if that doesn't help.

      Reply
  3. I'd been wondering how to do that, and your code worked so perfectly. Thanks for putting that up. :)

    Reply

Submit a Comment

Comments are manually moderated and approved at the time they are answered. A preview is shown while pending but may disappear if your are cookies cleared - don't worry though, the comment is still in the queue.

Your email address will not be published. Required fields are marked *.

We may earn a commission when you visit links on our website.

Latest From Divi Booster

Enable Automatic Looping for YouTube Videos in the Divi Video Module

Enabling automatic looping for YouTube videos in your Divi video module ensures that content plays seamlessly and continuously without interruption. This feature can enhance user engagement, highlight key information, or create dynamic visual effects on your website....

Hide Video Controls in Divi Video Module

Disabling YouTube video controls in the Divi Video Module helps create a seamless, distraction-free viewing experience for your site visitors. This approach is useful when you want full control over how your video content appears and is interacted with on the page, or...

Mute YouTube Videos by Default in the Divi Video Module

In the Divi Video Module, starting your YouTube videos muted by default can create a more user-friendly browsing experience on your webpage. It is particularly beneficial for reducing distractions, enhancing visitor engagement, and providing a seamless content preview...

Autoplay Videos in Divi Video Module

Enabling videos in your Divi video module to start playing automatically can enhance both the site's design and user engagement. To ensure full compatibility with browser requirements, such as Chrome's autoplay policy, it's often necessary to start your videos muted...

How to Add the Post Status in Divi's Dynamic Content

Divi's Dynamic Content feature is great for enhancing your post/page templates with post-specific information. While Divi includes an option to show information such as the Post Created Date using Dynamic Content, there is no equivalent option for the Post Status....

Random Divi Posts