WP Popups

The most complete WordPress popup builder plugin

  • Features/Addons
  • Pricing
  • Support
  • Docs
  • Login
  • My Account
  • Logout
  • Get WP Popups Now
You are here: Home / Docs / How to open a popup with a button or any HTML element

How to open a popup with a button or any HTML element

WP Popups lets you open your popup by clicking any HTML element of your website site. So, for example, you can make a certain image to open a newsletter popup, or a button opens a contact form popup, etc. The possibilities are endless as you are not limited to which element you want to make clickable.

Remember! You still need to configure the display rules of the popup to make it available on the desired pages or it won’t open.

Once you choose the desired element and add a “triggering class” to it. For that, first, you need to configure your popup triggers and choose the one called “Class Triggering”.

wppopups class triggering

On the trigger value field, you could enter a custom class name like for example “open-cta-popup” or leave it empty to use the default popup class which is “spu-open-{popup_id}”. You can find the default trigger class of your popups in the “All Popups” view:

trigger classes

It’s important to mention that closing and conversion cookies should be set to 0 so the popup it’s triggered every time!

In this example, we are going to use the “Contact Form modal” popup, so the trigger class we need to use is spu-open-153. So for example, if you want to open your popup by clicking an image you could do the following:

<img src=”https://yourdomain.com” alt=”alt text” class=”spu-open-153″/>
When you use manuel triggering on buttons or links the default action will be prevented and the popup will be opened without refreshing the page.

Another similar way could be opening a Popup by visiting a URL or programmatically with Javascript.

Search results

Categories

  • Addons
  • Email Marketing
  • Functionality
  • Getting Started
  • Misc
  • Styling

Need help?

Not finding what you need? We are here to help, please submit a support ticket.

Features

  • 30+ Display rules
  • 45+ Animations
  • A/B Testing
  • Analytics
  • Email Marketing
  • Zapier Addon
  • Multiple Triggers
  • Template Builder
  • Multiple Positions
  • Geolocation
  • Age Verification
  • Idle Logout
  • Leaving Notice
  • AJAX Login/Registration
  • Scheduler Addon

SITE

  • Blog
  • Docs
  • Pricing
  • Affiliates
  • Features
  • Contact
  • Terms & Conditions

Other Products

  • Timersys Plugins
  • GeotargetingWP
  • Facebook Login for WordPress
  • WooCommerce Map Delivery Area
  • WooCommerce Bogo Deals

Linsila LLC © 2024 · Built with Genesis

Before you leave, sign up to our newsletter to receive important updates from our blog and special pormotions!

×

BLACK FRIDAY! Enjoy an extra 25% (aprox) off discount using coupon code BF2024 on checkout

[contact-form-7 id=”fda370d” title=”Contact form 1″]

×