Event Brite Modal Popup

Hello,

In eventbrite they offer a popup style modal for the buy tickets button. I placed the code in my site at the bottom in the “Purchase Tickets” area. You will see when its clicked the event brite pops up over everything. How can I being that functionality to the other buttons and even the menu button that says purchase tickets? I feel like I need a jquery code that triggers the ID needed. If we can get this to work I will eliminate that entire section at the bottom for “Purchase Tickets”

Also do I need to move some of the code for the button to the JS area in the theme? This is the embed code from event brite…

<!-- Noscript content for added SEO -->
<noscript><a href="https://www.eventbrite.com/e/holiday-village-snow-park-light-village-tickets-171385617997" rel="noopener noreferrer" target="_blank"></noscript>
<!-- You can customize this button any way you like -->
<button id="eventbrite-widget-modal-trigger-171385617997" 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: '171385617997',
        modal: true,
        modalTriggerElementId: 'eventbrite-widget-modal-trigger-171385617997',
        onOrderComplete: exampleCallback
    });
</script>

Hi @Contourandco,

Thanks for reaching out!

Integrating 3rd party scripts to your website is outside the scope of our theme support. You may seek 3rd party developers to help you with your problems or you can avail One where we can answer questions outside of the features of our theme.

On the other hand, I suggest that you update your theme to the latest version from 2.4.6 to 5.0.8 to have compatibility with the code.

Just a friendly tip, if you have the basic knowledge on JS:

Hope that helps.

How can I add that ID to a menu item?

Hi @Contourandco,

Unfortunately, you can not assign a custom ID on the menu items, WordPress will add its own ID on those.

Thanks,

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.