How to add a popup to Textpattern CMS

To add a popup to Textpattern CMS, paste Popupsmart's embed code just before the closing body tag in each page template under Presentation, then Pages, or once in a shared form such as body_footer. Popupsmart then builds, targets and publishes every popup from its dashboard, so there's no plugin to install or update.

Add a popup to Textpattern CMS
Textpattern CMS logoPopupsmart logo

Setup at a glance

Runs on
Textpattern CMS
Where the code goes
Presentation → Pages → before </body>
Add-on
No plugin needed

Before you start

Adding a popup to Textpattern takes three things, and all of them are in reach without a developer:

  • An account in your Textpattern admin that can edit page templates under Presentation.
  • A free Popupsmart account. The free plan covers one website and one live popup, so you can finish this guide without paying.
  • The address your visitors use for the site, which Popupsmart verifies after the install.

How to add a popup to Textpattern CMS

The embed code goes into the page templates your sections use, once. After that you build, change and publish popups in Popupsmart without opening Textpattern again.

Step 1: Create your Popupsmart account

Sign up for a free Popupsmart account, or sign in to the one you have.

Popupsmart Registration

Step 2: Copy your embed code

In the dashboard, click Embed Code in the left menu.

Popupsmart Embed Code

Click Copy to clipboard. The code is one line, <script src="https://cdn.popupsmart.com/bundle.js" data-id="…" async defer></script>, and the data-id belongs to your account.

Copying Popupsmart Embed Code

Step 3: Paste the code into your Textpattern page templates

In the Textpattern admin, open Presentation and choose Pages.

Selecting Pages on Textpattern CMS

The panel lists your page templates. A standard install has three: archive, default and error_default. Click archive, paste the embed code just before the closing </body> tag in Page code, and click Save.

Adding Embed Code to Archive Page on Textpattern CMS

Do the same for default, and for any other page template your sections use. Paste the code once per template: each page on your site is built from one template, so a visitor loads it once.

Adding Embed Code to Default Page on Textpattern CMS

Both templates in the screenshots output the body_footer form just before </body>. If all of yours do, you can paste the code into that form under Presentation → Forms instead. My advice is to use the form whenever every page template outputs it: one copy covers the whole site, and there's one place to check later. Use one place or the other, not both, so the code doesn't load twice.

Step 4: Add and verify your website

Back in Popupsmart, hover over the profile icon at the bottom left and click Websites.

Popupsmart Websites Dashboard

Click + New website.

Adding New Textpattern Website on Popupsmart

Enter your site's address in the Add a new website window and click Save.

Adding Textpattern Site on Popupsmart

Popupsmart checks the site for your embed code, and a site with the code live shows as Verified.

Verified Textpattern Website on Popupsmart

If it shows as Unverified, click Unverified, then Verify website, and go back to the dashboard and click Refresh. The guide to verifying your website covers the other cases.

Step 5: Create your popup

Click + New Campaign on the Campaigns page. Name the campaign, choose your Textpattern website, then pick a template and change its copy, colours and form fields to match your site.

Creating a New Popup Campaign on Popupsmart

Step 6: Publish and check the popup on your site

Save the popup and open the Publish step. The targeting summary shows who will see the popup and when; click Publish. Then open your site in a private window and load an article or a section page. The popup appears when its trigger fires.

Publishing the Popup Campaign on Popupsmart

Does Textpattern have a built-in popup?

No. Textpattern has no popup builder; extra features come from plugins, which you paste into the Install plugin box on the Plugins panel. Textpattern's own guide to the Plugins panel recommends "a frugal habit of plugin use", because fewer plugins means fewer updates and fewer problems when a new Textpattern version arrives.

For one fixed message, a plugin or a modal you write into a form can do the job. Either one lives inside your Textpattern install: a plugin has to stay compatible with each release and be set up again on every site, and hand-written markup has to be edited every time the message changes. Popupsmart lives outside it: one line in your templates, then templates, targeting rules and lead delivery are managed from one dashboard for every site you run.

How do you show a popup only on some Textpattern pages?

A Textpattern popup reaches only the pages you pick when the embed code stays in your templates and each campaign carries its own targeting rule, such as "the URL contains /articles" or "the visitor is about to leave". The code only loads Popupsmart. Pasting it into one page template instead would tie the popup to every section that uses that template, and changing that later means editing templates again.

Set the moment as carefully as the page. In Popupsmart's 2026 benchmark, popups that wait before appearing convert 0.83% against 0.61% for popups shown the instant the page loads (median campaign), a lean rather than a proven gap, and exit intent shows no statistically reliable advantage. When a popup fires is worth deciding on purpose, especially on a site built around articles.

Textpattern is built around articles and sections, so most visitors came for the writing. A popup works best when it fits what they're reading:

Send your Textpattern popup leads to your email tool

Popupsmart can send every email address and name a popup collects to the tool you already use, so the leads go straight to your list. You connect it in the campaign's Integration section. The MailerLite popup guide and the Brevo popup guide walk through a connection; the help center lists 19 destinations, and a webhook, Zapier or Make covers a tool that isn't one of them.

Does a popup slow down a Textpattern site?

A Popupsmart popup doesn't hold up a Textpattern page: the embed code loads asynchronously (async defer), so the browser finishes building your page before it fetches Popupsmart. Nothing is added to the server side of Textpattern: no plugin runs when a page is rendered.

  • The section uses another page template. Open Presentation → Sections, check which page the section uses, and add the embed code to that page too.
  • The code is in the template twice. If you pasted it into a page and into a form that page outputs, remove one; Popupsmart's code should load once per page.
  • The website isn't verified. A campaign runs only on a verified website; see Step 4.
  • The address doesn't match. www.example.com and example.com are different sites to a browser. Add the address your visitors actually use.
  • A cache is serving the old page. If your site uses a caching plugin or a CDN, clear its cache after saving the template.
  • The trigger hasn't fired yet. An exit-intent or scroll trigger waits for the visitor to leave or scroll; test in a private window and behave like a visitor.
💬
From the support queue: When one Textpattern section shows no popup, what I check first is which page template that section uses. Textpattern's Sections panel guide notes that a new section gets the default page automatically and can be reassigned at any time, so a section can end up on a template without the code. The mistake to avoid is fixing it by also pasting the code into body_footer: pages that output both would load it twice.

Textpattern popup FAQ

Is there a free way to add a popup to Textpattern?

Yes. Popupsmart's free plan is permanent, not a trial: one website, one live popup and 5,000 pageviews a month, with Popupsmart branding. It is enough to install the code and run your first popup on a Textpattern site.

The Popupsmart pricing page compares it with the paid plans.

Do I need coding skills to add a popup to Textpattern?

No. You paste one line of code into your page templates once, in the Textpattern admin. Everything else, from the design to the targeting, happens in Popupsmart's visual editor.

Do I need a Textpattern plugin for popups?

No. Popupsmart runs from the embed code in your page templates, so there is no plugin to install under Admin and nothing to update when you upgrade Textpattern.

How long does it take to add a popup to Textpattern?

The Textpattern side is one line in each page template, or once in a shared form; the rest is building the popup. Among people who published a campaign in the 90 days to 16 September 2026, the median time from signup to the first published campaign was 32.5 minutes, and 287 of 332 published within a day, according to Popupsmart's own product data. That figure covers every platform, not Textpattern alone.

Can I build a lightbox or contact form popup for Textpattern?

Yes. Popupsmart's layouts include a centred lightbox, a full-screen popup, a floating popup and a small sidebar popup in the corner, and the editor adds form fields such as email, name and phone to any of them.