So, You Want a Simple Popup Without All the Bloat?

Most of the time when I need to use a popup I use the Popups for Divi plugin, but the last time I installed it, I got a JavaScript conflict with a critical plugin 🙁 So… I had to figure out a work around. I have used several popup scripts before, but I wanted to keep my website as optimized as possible.

Since it is fast, convenient, and I know Divi uses it too, I decided to use Magnific Popup JavaScript.

Step 1: JavaScript

	jQuery( document ).ready(function($) {
			type: 'inline'


The JavaScript can be placed anywhere if it is wrapped in “document ready”, but I find the easiest/best place is in the Divi Theme Settings > Integrations > Head Code Area.

FYI: using function($) allows the $ shorthand within the function

Step 2: Container/Target

In my example I use a section block to hold the content. You should be able to place whatever type of module you want inside your section as the content. 

Style your section as desired for the wrapper of the content. Section styling does not affect the overlay.


You can place your popup section container anywhere, but I think it only makes sense to added it to the end of the page. Be sure to give it an admin label to easily identify it later.

For global pop-ups you can create a global footer using Divi Theme Builder.

Step 3: CSS

You’ll need to add the following classes to your container. I’m using a section module, but it should work with any HTML element.






If your having trouble, make sure you’re not including the period (.) or hash (#) in the fields. Avoid the facepalm 🙂  

Divi Popup No Plugin

Step 4: Trigger

To create a trigger, you will need 3 things. The target for the href, the selector class to disable smooth scroll and the selector class to trigger Magnific popup script.

There are other ways to trigger a Magnific popup (see documentation).

Most Basic Text Link Usage:

<a href="#popup-demo" class="your-class">LINK TEXT HERE</a>

Button Module Usage:

FYI: Figuring out how to disable smooth scroll was a huge pain is the ass. After a while I gave up and contact support for that tidbit. 

Aside: Divi support is very good, if you don’t have a current license, I highly recommend it.

There you have it. A simple, straightforward way to add a popup using Divi and Magnific Popup without additional plugins or scripts.

To hire me for a custom implementation or one-on-one support, contact me.

More tutorials to follow. Make your requests below…