Or, in its own meta tag

Wednesday, August 21, 2024

Add a popup that appears on button click and loads automatically on a WordPress website

Download popup maker: https://wordpress.org/plugins/popup-maker/

Upload it and install it as a plugin

Then activate it.

Go to Popup Maker on left side menu → click to Add Popup

Give it a title and add content inside the editor.

Below, Under Popup Settings, go to the "Triggers" tab.

Click 'Add New Trigger'.


Choose 'Click Open' as the trigger type.

OR

To Automatic Popup, choose Time Delay / Auto Open as the trigger type and then choose range 5000ms for time delay


Click Add and then Update the popup to save. 


To change its (Popup) size and looks:

Click on Display under Popup Settings, 

Select tab Appearance and choose 'Enterprise Blue' from Filter (Popup Theme)

Then Click on Size tab and choose size from dropdown 'Large - 80%' and select Max Width 400 in px.

And save it.

Step 3: Add the Class to Your Button / Add this popup to your button


Click on the button block.

In the right-hand block settings, scroll to Advanced.

In CSS classes, add: popmake-1111 (Replace 1111 with your popup’s ID.)

And publish it. 


If you're using HTML or Custom Code, your button should look like this:

<button class="popmake-1111">Open Popup</button>