· 3 min read

How to Create Popups in WordPress Without Plugins?

Murathan Yıldırım
-Published on:
Jan 19, 2024
-Updated on:
Jan 13, 2026

Do you want to add popup windows on your WordPress site without any plugins?

You do not need any plugin because through this simple code, you can easily create a popup on your website in Wordpress.

WordPress plugins might be problematic in terms of the sustainability of your webpage additions and security of your website.

Furthermore, they have an adverse impact on website speed.

Therefore, why you would deal with a plugin when you can easily set your popup without any plugins?

You can freely have popups in your website with a single line of code by using Popupsmart, an easy to use popup builder.

How? Here is how and it only requires 5-minutes of efforts!

How to Add Popup Code to Your WordPress Website?

First, create your free account with Popupsmart.

Popupsmart's homepage with the headline "Popup builder that boosts sales" on the left followed by a short descriptive text and "Get Started" and "Product Demo" buttons, showing "Sign In" and "Get Started" buttons highlighted

1. After you sign up, you'll land on your dashboard. Firstly, let's add our website by clicking on your profile and choosing "Websites."

Popupsmart's Campaigns page interface with a small window open in the bottom left corner showing "Websites" highlighted

2. Then, continue with "New website" button.

Popupsmart's Websites interface showing "New website" button highlighted in the upper right corner

3. Enter your website URL, and save it.

Popupsmart's Websites page interface with a modal window with a field to enter the website URL followed by "Cancel" and "Save" buttons

4. Your website will appear as "Unverified." Click on "Unverified" to see your embed code.

Popupsmart embed code modal with the embed code, "copy to clipboard" button and some informative text to embed the code on the website

5. Then, copy the embed code to the clipboard and navigate to your Wordpress website's Admin panel and navigate to "Appearance". Click "Theme File Editor."

Wordpress website Admin panel showing "Appearance" highlighted on the left-hand panel

6. Check your theme and click on the "Footer."

Wordpress Admin panel Appearance section showing "Theme" and "Footer" highlighted

7. Then, add your embed code before the < /body > tag.

Wordpress website Admin Theme Footer section showing Popupsmart's embed code highlighted

8. Don't forget to update your file.

Wordpress website Admin Theme Footer section showing "Update File" button highlighted

The placement of the code matters! You need to paste it to before closing the "body" tag.

9. Go back to your Popupsmart dashboard. And click "Verify".

Popupsmart's embed code modal showing "Verify website" button highlighted

When you click that, it will direct you to your WP website. If you see the little modal pops up on the screen that says "Popupsmart installation verified." then it means you are good to go!

A Wordpress website showing "Popupsmart installation verified" modal highlighted in the upper left corner

Here is how a verified website looks on your Popupsmart website's page:

Popupsmart's Websites page showing a Wordpress website verified and highlighted along with other verified websites above

Enjoy your popup! 🚀

a Wordpress website with a popup showing a megaphone and "New Stuff" head text in pink theme

You know how to create a popup in WordPress without plugins and by using Popupsmart instead!

I hope this article is beneficial for you during your website design and helps you create new campaigns to increase your conversions. Happy marketing!

You may also like;

Frequently Asked Questions

What is Wordpress image popup on click without plugin?

A WordPress image popup on click without a plugin is a lightbox-style effect where an image opens in an overlay (modal) when a visitor clicks it, without installing a WordPress plugin to power the popup. Instead, you add the functionality using code (typically a small JavaScript snippet plus CSS) or by embedding a third-party popup tool’s script into your theme, so the click event on the image triggers a modal that displays a larger version of the image, a gallery, or even custom content. For example, you might wrap an image in a link and use a simple script to intercept the click and show the linked image in an overlay, or you can use a no-plugin approach like Popupsmart by placing its embed code before the closing </body> tag and configuring a campaign that opens when a specific image (or button near it) is clicked. This approach is popular when you want to keep your WordPress install lightweight, reduce plugin conflicts, and maintain more direct control over how and when the popup appears.

What is WordPress popup plugin?

A WordPress popup plugin is an add-on you install in WordPress to create and manage popups (also called modals) directly from your WordPress dashboard, usually with a visual builder and built-in targeting rules. These plugins typically let you create different popup types—email opt-in forms, discount offers, announcement banners, exit-intent popups, age verification, cookie consent notices, and more—without writing code, and they often include features like triggers (on page load, after a delay, on scroll, on click), targeting (specific pages, categories, devices, referrers), integrations (Mailchimp, HubSpot, WooCommerce), and analytics or A/B testing. While convenient, popup plugins can add extra scripts, affect performance, or create compatibility issues depending on your theme and other plugins, which is why some site owners prefer a no-plugin method such as embedding a lightweight script from a dedicated popup service and controlling everything externally.

How to create a popup form in wordpress?

To create a popup form in WordPress, you generally need three pieces: the form content (fields like name/email/phone), the popup container (the modal that displays the form), and the trigger/targeting rules (when and where the popup appears). Without using a WordPress plugin, a common approach is to use a popup builder like Popupsmart: create an account, add your website, copy the provided embed code, and paste it into your theme’s footer file right before the closing </body> tag via Appearance > Theme File Editor, then verify the installation and build your popup form in the Popupsmart dashboard using its form elements and design options. From there, you can set display rules such as showing the form after a time delay, on scroll, on exit intent, or on click of a button, and you can connect the form to your email marketing tool or redirect users to a thank-you page after submission. If you prefer a fully manual route, you can also code a form in HTML, style it with CSS, and use JavaScript to open/close the modal and validate submissions, but using an embedded no-plugin tool is usually faster and reduces the risk of breaking your theme while still avoiding a traditional WordPress popup plugin.