# WordPress
Add Plandalf checkout buttons, inline embeds, countdown widgets, and customer identity to WordPress pages.
Source: /docs/platforms/wordpress
Last modified: 2026-06-19
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.


> **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


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


### Add one checkout action


    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


### WordPress Custom HTML block


```html Button
<script src="https://acme.plandalf.com/js/plandalf-sdk.js" async></script>

<button data-plandalf-present="pro-plan">
  Buy Pro
</button>
```

```html Inline checkout
<div data-plandalf-mount="pro-plan" style="min-height: 480px"></div>
```

```html Countdown
<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.

```html
<script>
  window.addEventListener("load", () => {
    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.


## Related docs


### [Identify customers](/docs/sdk/identity)


    Pass logged-in WordPress users into checkout safely.


### [Gates](/docs/sdk/gates)


    Use purchase or membership context to control what visitors can see.


### [Add to your site](/docs/offers/add-to-site)


    Pick hosted checkout, button, inline checkout, or direct link.