Selling tickets in WordPress (without a plugin)

MijnEvent has no WordPress plugin, and you don't need one. You copy the embed code from your dashboard, paste it into a Custom HTML block, and ticket sales run on your own page. Including the pitfalls WordPress can throw at you.

Photo: Christopher Gower / Unsplash

Is your site running on WordPress? Then the question we get most often is: "is there a plugin?" The honest answer is no. There is no MijnEvent plugin for WordPress, and there won't be one any time soon — because you don't need it. What does exist: a two-line embed code that works in any WordPress site, and a read-only API for anyone who wants to build their own agenda. This article shows exactly how to do it, including the things that can go wrong in WordPress.

Why no plugin?

A plugin has to be installed, updated and kept compatible with your theme, your page builder and next year's WordPress version. Everything a plugin would do — put ticket sales on your page — the embed code does too, without anything running inside your WordPress installation. Move to a different CMS one day and the same code moves with you. Fewer moving parts, less maintenance.

Step 1: get the code from your dashboard

In your dashboard, go to Integrations. Under Tickets on your own website, pick the event and you get two variants:

The script embed (recommended). One div plus one script line:

<div data-mijnevent-event="summer-party-2026"></div>
<script src="https://yourclub.mijnevent.nl/embed.js" async></script>

The script places the widget and keeps measuring its content: as the ticket list grows or the order step unfolds, the frame grows with it. No second scrollbar, no cut-off content. Multiple events on one page? Place multiple divs; one script line at the bottom serves them all.

The iframe (fallback). Works without a script, but you fix the height yourself:

<iframe src="https://yourclub.mijnevent.nl/widget/summer-party-2026"
        width="100%" height="640" frameborder="0"
        style="border:none;border-radius:12px;" title="Tickets"></iframe>

With a long ticket list or the order step, content gets cut off, or you're left with white space. Only use this if you can't place a script.

Step 2: paste the code into WordPress

There are three places, depending on how you build your pages.

Block editor (Gutenberg). Click +, look for the Custom HTML block and paste the code into the text field. Click Preview to check that the widget loads; inside the editor you only see the code. Save and view the page.

Elementor. Drag the HTML widget to where the tickets should appear and paste the code into the field. The widget only shows up in the preview or on the live page, not in edit mode.

Classic editor. Switch from Visual to the Text tab (HTML mode) in the top right and paste the code there. After that, don't switch back to the Visual tab before saving — more on that below.

If the widget doesn't show up

Four causes explain nearly everything that goes wrong.

  1. The visual editor stripped your script. WordPress' visual mode cleans up HTML and removes <script> tags, especially for accounts without full HTML rights and on multisite installs. Work in the Custom HTML block or in HTML mode, and check after saving that the script line is still there.
  2. A security plugin is blocking it. Firewall and hardening plugins sometimes filter external scripts, or a Content Security Policy only allows scripts from your own domain. Allow-list your MijnEvent subdomain, or use the iframe variant — it contains no script.
  3. A caching plugin is serving an old page. Clear the plugin cache and your browser cache after pasting. Note that only the page is cached. The widget's contents are fetched live from MijnEvent, so prices and availability stay current even on an aggressively cached page.
  4. The page is served over HTTP. Modern browsers refuse to mix an https iframe or script into an http page. Move your site to HTTPS — you want that regardless.

Payment happens outside the widget

Ordering — picking ticket types, quantity, name and email address — happens inside the widget on your page. Payment goes outside the frame: Mollie's payment page sends headers that forbid framing, so loading it inside the iframe would leave the visitor staring at a blank page mid-payment.

In practice you'll notice this: with both the ticket widget and a module storefront, the payment page takes over the main window. If that's blocked, for instance by a strict iframe sandbox, a button to the payment page appears instead. After payment the visitor lands on the MijnEvent confirmation page, with a button back to your website, and receives the tickets by email.

More than tickets: module storefronts

If you use more than ticket sales, Integrations → Module embed offers the same loader for a complete module storefront. Available for the modules enabled for your organisation: rentals & reservations, shop, food trucks, parking & camping, memberships, courses and donations.

<div data-mijnevent-module="courses"></div>
<script src="https://yourclub.mijnevent.nl/embed.js" async></script>

Same principle, same automatic height. That puts your course programme or your shop on an ordinary WordPress page, with the order and the administration in MijnEvent.

Build your own agenda: the events API

Want to show events in your own theme — your cards, your styling, your filters? There's a read-only API on your subdomain:

  • GET https://yourclub.mijnevent.nl/api/events — the published, upcoming events with date, location and from-price.
  • GET https://yourclub.mijnevent.nl/api/events/{slug} — one event with its ticket types and availability.

No key required. Fetch it from your WordPress server with wp_remote_get() and store the response briefly in a transient, so you're not fetching on every page view. You then sell through the widget or a link to the event page.

Be clear about what this API is and isn't: it is read-only. There are no write operations, no webhooks and no API tokens that let you drive the dashboard from WordPress. If you need more than reading, use the widget.

Member prices from your WordPress server

If your site has a member login, WordPress can pass along per purchase that someone is a member. Your server signs a short-lived HS256 token with the secret key from Integrations and puts it on the div:

// In functions.php, as a shortcode: [mijnevent_tickets]
add_shortcode('mijnevent_tickets', function () {
    $token = is_user_logged_in() ? mijnevent_member_token(wp_get_current_user()) : '';

    return sprintf(
        '<div data-mijnevent-event="summer-party-2026" data-member-token="%s"></div>'
        .'<script src="https://yourclub.mijnevent.nl/embed.js" async></script>',
        esc_attr($token)
    );
});

MijnEvent verifies the token both when displaying tickets and at checkout, and then applies the member price or the members-only ticket type. If the token is empty, invalid or expired, the visitor is simply treated as a paying non-member — nothing breaks. The signing itself, with a working PHP example, is covered in Connecting ticket sales to your existing website.

In short

No plugin, no install, no updates: two lines of code in a Custom HTML block and you're selling tickets from your own WordPress page. If it doesn't work straight away, it's almost always the visual editor, a security plugin or the cache. For a broader overview of the integration options, see Integrating ticket sales: embed, API and member linking; the rest is in the knowledge base.

Frequently asked questions

Frequently asked questions

Does MijnEvent have a WordPress plugin?

No. There is no plugin and none is needed: you paste a two-line embed code into your page. That works in the block editor, in Elementor and in the classic editor, whatever your theme.

My embed code disappears as soon as I save the page. How do I fix that?

The visual editor or a security plugin is stripping the script. Use the Custom HTML block (or HTML mode), and if that still fails, paste the iframe variant from your dashboard — it contains no script.

Can visitors pay inside the widget?

Visitors place the order inside the widget on your page. Mollie's payment page refuses to load in an iframe, so it opens outside the widget: in a new tab for the ticket widget, in the main window for a module storefront.
Back to blog
MijnEvent

Filling blank city cards afterwards: put credit on a whole stack at once

Have blank cards printed for free and put credit on them later: a range of sequence numbers from a batch, or individual cards by their pass code. The fee goes on your monthly invoice.

Request modules yourself from your dashboard

Want to add rentals, courses or partner tickets? Tick the modules in your dashboard, tell us briefly what you want to do with them and send your request. Within 24 hours you hear whether the module is switched on.

Scanning partner tickets and settling with your partners

At the door you scan a partner ticket like any other ticket, and the scanner shows which partner the guest comes from. Afterwards MijnEvent counts per partner what there is to settle.