Browse Product guides

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

  1. Choose where the SDK loads

    Put the script in a Custom HTML block for a quick test, or enqueue it from the theme/plugin for a production-wide install.

  2. Add one checkout action

    Use a Custom HTML block or template markup with data-plandalf-present.

  3. Identify logged-in users when needed

    Membership and LMS sites should generate identity server-side and call identify() on checkout pages.

  4. 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>

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.

Empty WordPress login form

Sign in with the account allowed to publish pages and insert JavaScript.

  1. Enter the WordPress username or email.
  2. Enter the password.
  3. 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.

WordPress dashboard for the Plandalf Builder Guide site

Check the site identity before changing pages.

  1. Confirm the site name in the admin toolbar.

3. Open Pages

Choose Pages in the left menu. Select Add Page above the page list.

WordPress Pages list

Open the page list and start a separate checkout test page.

  1. Open Pages.
  2. 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.

WordPress starter pattern picker

Close the pattern picker so the checkout test starts on a blank page.

  1. 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.

WordPress editor Options menu

Switch this page to the Code editor.

  1. Open Options.
  2. 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.

WordPress page Code editor with empty title and HTML fields

The page Code editor has a title field and a separate HTML field.

  1. Use this field for the page title.
  2. 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.

WordPress Code editor with Plandalf checkout test as the title

Give the page a distinct test title before adding code.

  1. 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.

WordPress Code editor containing the Plandalf SDK and checkout button HTML

Paste one Custom HTML block with your public SDK host and offer slug.

  1. Replace the example SDK host with your public host.
  2. 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.

WordPress editor showing Saved and Draft saved confirmations

Wait for both save confirmations before publishing.

  1. Confirm the editor status says Saved.
  2. 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.

WordPress pre-publication review panel

Review the destination and visibility before publishing the test page.

  1. Confirm the intended site and address.
  2. Review Visibility and publication timing.
  3. 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.

WordPress page published confirmation

Use the live confirmation to open the actual rendered page.

  1. Confirm the page is now live.
  2. 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.

Published WordPress checkout test page

Verify the title and checkout button on the rendered page.

  1. 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.

Plandalf checkout opened over the WordPress page

Check the actual checkout product, recurrence and total without submitting payment.

  1. Confirm the product and billing interval.
  2. Confirm the total due today.
  3. 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.

WordPress checkout test page after closing checkout

The page should remain usable after checkout closes.

  1. 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.

WordPress login screen confirming the administrator is logged out

Confirm the administrative session ended before the visitor test.

  1. 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.

Published WordPress checkout page without the admin toolbar

The anonymous page should have no admin toolbar and should retain the checkout action.

  1. Confirm the WordPress admin toolbar is absent.
  2. 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.

Plandalf checkout opened by a signed-out WordPress visitor

Verify the same offer opens for a signed-out visitor.

  1. Confirm the expected product and billing interval.
  2. Confirm the expected total.
  • 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.

Feature detail