Here’s a test of the OTS Widget using Vanguard Theater’s widget. Here’s the code we’re embedding.
This goes in the <head> of the document. I’m using the CodeSnippets plugin and inserting this globally:
<script>(function(){window.ONTHESTAGE_API_KEY='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NjI5OGJlYWQzMThmZDE1ZGM5MmY0ZDAiLCJlbWFpbCI6IndpZGdldF9hcGlAdmFuZ3VhcmQtdGhlYXRlci1jb21wYW55LmNvbSIsIm9yZ2FuaXphdGlvbiI6IjY1NWI5Mjk4Y2M1MTcyMGU0NjAxN2U3ZSIsIm9yZ19zbHVnIjoidmFuZ3VhcmQtdGhlYXRlci1jb21wYW55Iiwicm9sZXMiOlsid2lkZ2V0X2FwaSJdLCJpYXQiOjE3MTk0Mjc4MTYsImV4cCI6MTc1MDk2MzgxNn0.SENLx4SmpX97hcl8gT5SzoJS-cJOrLJdfa_5MHQUMxo';var otswidget_js_esm = document.createElement('script');otswidget_js_esm.setAttribute('type', 'module');otswidget_js_esm.setAttribute('src', 'https://cdn.onthestage.tickets/prod-v2/ots-widgets.esm.js');document.head.appendChild(otswidget_js_esm);var otswidget_js = document.createElement('script');otswidget_js.setAttribute('src', 'https://cdn.onthestage.tickets/prod-v2/ots-widgets.js');otswidget_js.setAttribute('nomodule', '');document.head.appendChild(otswidget_js);var otswidget_css = document.createElement('link');otswidget_css.setAttribute('rel', 'stylesheet');otswidget_css.setAttribute('href', 'https://cdn.onthestage.tickets/prod-v2/ots-widgets.css');document.head.appendChild(otswidget_css);
Then in the body of the WordPress page this widget code is inserted using a custom HTML block:
<onthestage-widget organization-id="655b9298cc51720e46017e7e" modal="true" widget-style="list" production-id="65cfab995cca1f0e4263c67c"></onthestage-widget>
<button data-onthestage-production-id="65cfab995cca1f0e4263c67c">Buy Tickets</button>