Articles on: Extras/Advanced

How to Trigger a Popup by Clicking on a URL

It is possible to open the popup when the certain URL on the website is clicked.
First, the popup will open.
Once the popup is closed, the user will be redirected to the same URL or another.

Please, check the required steps below.

Create the popup which you want to be opened, when the URL is clicked and from the Events section choose the Set by CSS Class event.



Open the editor of the appropriate page/ post, switch to the Text tab and and insert the code below:

<a href="https://popup-builder.com/" class="sg-confirm-popup-19282">https://popup-builder.com/</a>




Where:



href = https://popup-builder.com/ (required attribute of the link, where the user will be redirected after closing the popup)
class = sg-confirm-popup-19282 (19282 is an ID number of the popup, which will open when the URL is clicked)

Right after, Publish the page/ post.

In this case, when the URL, that is https://popup-builder.com/ is clicked, the popup will appear.
Users will be redirected to https://popup-builder.com/ once they close the popup.

If you want to redirect the users to different URL, ensure to change the URL from the code inserted into the page/post.

Please, also check the gif below to visualize the steps:

Updated on: 19/05/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!