WordPress
WordPress can host Plandalf through Custom HTML blocks, theme templates, or plugin-managed script injection. Use the simplest block first, then move the script into a theme or plugin once the page works.
Note. WordPress is the page shell Let WordPress handle content, memberships, and templates. Let Plandalf handle the offer, checkout, promo pricing, invoices, and post-purchase automation.
The path
-
Put the script in a Custom HTML block for a quick test, or enqueue it from the theme/plugin for a production-wide install.
-
Use a Custom HTML block or template markup with
data-plandalf-present. -
Identify logged-in users when needed
Membership and LMS sites should generate identity server-side and call
identify()on checkout pages. -
Verify with the published page
Test the real page output because builders, cache plugins, and optimizers can move or delay scripts.
Quick block install
<script src="https://acme.plandalf.dev/js/plandalf-sdk.js" async></script>
<button data-plandalf-present="pro-plan">
Buy Pro
</button><div data-plandalf-mount="pro-plan" style="min-height: 480px"></div><div data-plandalf-promo="early-bird"></div>Logged-in users
For membership, LMS, or account-based sites, generate a signed identity token server-side and identify the visitor before checkout. Put this script on the page after the SDK loads. The non-async script tag below makes that order explicit.
<script src="https://acme.plandalf.dev/js/plandalf-sdk.js"></script>
<script>
plandalf.ready(() => {
plandalf.identify("SIGNED_JWT_FROM_WORDPRESS");
});
</script>WordPress setup choices
-
Custom HTML block(page-level): Fastest way to test one page or one campaign. -
Theme template(template-level): Useful when every product, post, or landing page should expose a buying action. -
Plugin/script enqueue(site-level): Best for a managed production install, especially when caching or optimization plugins are active.
Replay the WordPress page, one step at a time
The screenshots below were captured from real WordPress 7.1.3 on 8 October 2026, using a fresh local database and the Twenty Twenty-Five theme. They cover a page-level button install, saving, publishing locally, and opening checkout both signed in and signed out. They do not yet verify a production SDK release, payment, customer identification, membership access, caching plugins, inline checkout or countdowns.
You need a WordPress account allowed to publish pages and insert JavaScript, plus your own configured Plandalf checkout. The screenshots use flindev.numi.test, which is a local development address; do not copy it into a public site.
1. Open your WordPress login
Open your site’s /wp-admin/ address. Enter your own username and password, then choose Log In. This screenshot intentionally shows empty credential fields.

Sign in with the account allowed to publish pages and insert JavaScript.
- Enter the WordPress username or email.
- Enter the password.
- Choose Log In.
2. Confirm the correct site
Check the site name in the top toolbar. This replay uses a fresh local WordPress installation named Plandalf Builder Guide with the Twenty Twenty-Five theme.

Check the site identity before changing pages.
- Confirm the site name in the admin toolbar.
3. Open Pages
Choose Pages in the left menu. Select Add Page above the page list.

Open the page list and start a separate checkout test page.
- Open Pages.
- Choose Add Page.
4. Start with a blank page
If Choose a pattern appears, close it using the cross in its upper-right corner. The pattern previews were blank in this local environment; no starter pattern was applied.

Close the pattern picker so the checkout test starts on a blank page.
- Close the starter pattern picker.
5. Open the editor options
Select the three-dot Options menu at the top right. Under Editor, choose Code editor. The visual editing canvas was blank in this replay, so the steps below use the actual Code editor.

Switch this page to the Code editor.
- Open Options.
- Choose Code editor.
6. Check the two editing fields
Confirm that Editing code, Add title, and Start writing with text or HTML are visible. This is the page code editor, not the theme file editor.

The page Code editor has a title field and a separate HTML field.
- Use this field for the page title.
- Use this field for the block HTML.
7. Name the test page
Enter Plandalf checkout test in Add title. Keep this separate from an existing sales page until you finish testing.

Give the page a distinct test title before adding code.
- Enter the test page title here.
8. Paste the SDK and checkout button
Paste the following into the HTML field. Replace the SDK host and offer slug with values from your own checkout. The screenshot uses a local development host and a local offer; those values are not a public demo.
<!-- wp:html -->
<script src="https://YOUR-PUBLIC-HOST/js/plandalf-sdk.js" async></script>
<button data-plandalf-present="YOUR-OFFER-SLUG" data-plandalf-mode="test">Open test checkout</button>
<!-- /wp:html -->Only paste the HTML block comments when using the page Code editor shown here. Confirm your provider is connected in test mode before attempting a payment; the attribute alone is not payment-provider verification.

Paste one Custom HTML block with your public SDK host and offer slug.
- Replace the example SDK host with your public host.
- Replace the example offer slug and keep test mode for this replay.
9. Save the draft
Select Save draft. Wait for Saved and the Draft saved message. If WordPress removes the script when saving, stop and check whether your account and hosting plan permit custom JavaScript.

Wait for both save confirmations before publishing.
- Confirm the editor status says Saved.
- Confirm the Draft saved message.
10. Review publication settings
Select Publish once. Check the site name, Visibility, and publication time in the confirmation panel. This replay published only to a local fixture.

Review the destination and visibility before publishing the test page.
- Confirm the intended site and address.
- Review Visibility and publication timing.
- Choose Publish only after the checks match.
11. Publish the test page
Choose Publish in the confirmation panel. Wait for the page title followed by is now live. Use View Page to open the published result.

Use the live confirmation to open the actual rendered page.
- Confirm the page is now live.
- Choose View Page.
12. Check the published button
Confirm that the page title and Open test checkout button appear outside the editor. A visible button alone does not confirm that the SDK loaded.

Verify the title and checkout button on the rendered page.
- Choose Open test checkout.
13. Open the real checkout
Select Open test checkout. Wait for the actual checkout to replace any loading message. Check the product, recurrence and total against your intended offer. This local offer displayed Plandalf Checkouts Monthly, billed monthly, with $25.00 due today; no payment was submitted.

Check the actual checkout product, recurrence and total without submitting payment.
- Confirm the product and billing interval.
- Confirm the total due today.
- Use this control to close checkout.
14. Close the checkout
Use the checkout’s close/back control at its top right. Confirm that the published WordPress page remains usable and the button is still present.

The page should remain usable after checkout closes.
- Confirm the checkout button remains available.
15. Sign out of WordPress
Use Log Out in your WordPress account menu. Confirm You are now logged out before returning to the test page. Logging out of WordPress does not clear separate Plandalf browser storage.

Confirm the administrative session ended before the visitor test.
- Check the logged-out confirmation.
16. Reopen the published URL
Open the published page address again. Confirm that the WordPress admin toolbar is absent and the checkout button is visible.

The anonymous page should have no admin toolbar and should retain the checkout action.
- Confirm the WordPress admin toolbar is absent.
- Choose Open test checkout as a visitor.
17. Open checkout as a visitor
Select Open test checkout again. Confirm the checkout opens with the expected product and total while signed out of WordPress. This verifies opening the checkout, not a completed payment, membership grant or fulfilment event.

Verify the same offer opens for a signed-out visitor.
- Confirm the expected product and billing interval.
- Confirm the expected total.
Related docs
-
Identify customers — Pass logged-in WordPress users into checkout safely.
-
Gates — Use purchase or membership context to control what visitors can see.
-
Add to your site — Pick hosted checkout, button, inline checkout, or direct link.
Integration overview
See Plandalf with WordPress for the integration overview.
