Dear EventOn
I have to incorporate a button in either the event description or custom metadata field of an event. It is embedded HTML and JS code.
The button shows up but the script won’t run. It runs fine on ordinary WordPress pages.
Are scripts disabled in the text editor of the EventOn plugin?
I would like to keep using your products, but it is vital that I can embed in the events. I hope you can help me.
Best
Markus
Hello,
Please send us wp-admin access to your site as a private message for us to further assist your situation.
Please also send us event’s name with the added script and button.
Dear Artem,
Due to organisational security policy I can’t share access to the website. The code that needs to run could be:
<!– Noscript content for added SEO –>
<noscript><a href=”https://www.eventbrite.com/e/test-tickets-120022074255″ rel=”noopener noreferrer” target=”_blank”></noscript>
<!– Button –>
<button id=”eventbrite-widget-modal-trigger-120022074255″ type=”button”>Buy Tickets</button>
<noscript></a>Buy Tickets on Eventbrite</noscript>
<script src=”https://www.eventbrite.com/static/widgets/eb_widgets.js”></script>
<script type=”text/javascript”>
var exampleCallback = function() {
console.log(‘Order complete!’);
};
window.EBWidgets.createWidget({
widgetType: ‘checkout’,
eventId: ‘120022074255’,
modal: true,
modalTriggerElementId: ‘eventbrite-widget-modal-trigger-120022074255’,
onOrderComplete: exampleCallback
});
</script>
The code works fine.
It should be possible to test it in any event environment by eventon.
Best
Markus
I use this plugin https://en-au.wordpress.org/plugins/insert-html-snippet/ updated 1 week ago
so you copy and paste the script into that and it gives you a shortcode to place on your web page
you will want to use the multi lines of text custom meta data
its possible the wordpress editor is removeing some of the script