Help Desk

Sell Tickets Through Eventbrite While Not Publicizing Event on Eventbrite

  • Posts: 9 Topics: 2
    | Permalink

    We want to sell tickets via Eventbrite but not publicize our events through Eventbrite (i.e., we only want to publicize them on our website). I found a January 2017 forum post––that addresses the issue and provides a way to do this. Is the information in that post still current?


    Posts: 6978 Topics: 2
    | Permalink

    Hello duekerla,

    Thanks for reaching out.

    There haven’t been any major changes to our Eventbrite plugin, so that should still work. Give it a try and let me know if you need further assistance.


    Posts: 9 Topics: 2
    | Permalink

    Hi András,

    Yup, it still works.

    One issue with the code that’s displayed in that post, however. Not quite sure how this happened, but a number of characters have been turned into their HTML code equivalents. That would be fine if this were HTML, but it’s not–it’s pure PHP. For example, the code as written reads (line 5):

    $event = $api->get_event( $post_id );

    It should read:

    $event = $api->get_event( $post_id );

    Similar problems exist throughout the code, bringing down the website with syntax errors. Once I translated all the HTML codes to the characters they represented, things worked fine. Here’s the result, in case it’s useful to someone else in the future:

    function eb_iframe_show_even_if_private() {
        $post_id  = get_the_ID();
        $api = tribe( 'eventbrite.api' );
        $event = $api->get_event( $post_id );
        if ( ! $event ) {
        $event_id = $event->id;
        $iframe_url = ( is_ssl() ? 'https://' : 'http://' ) . '';
        $iframe_url = apply_filters( 'tribe_events_eb_iframe_url', sprintf( $iframe_url, $event_id ) );
        $html = '';
        if (
            ! empty( $event_id ) &&
            $api->is_live( $post_id ) &&
            tribe_event_show_tickets( $post_id )
        ) {
            $html = sprintf(
                '<div class="eventbrite-ticket-embed" style="width:100%%;text-align:left">
                            <iframe id="eventbrite-tickets-%1$s" src="%2$s" style="height:200px;width:100%%;overflow:auto;"></iframe>
                            <div style="font-family:Helvetica, Arial;font-size:10px;padding:5px 0 5px;margin:2px;width:100%%;text-align:left">
                                <a target="_blank" href="">Event registration</a>
                                <span style="color:#ddd"> powered by </span>
                                <a target="_blank" href="">Eventbrite</a>
                        </div>', $event_id, $iframe_url );
        $html = apply_filters( 'tribe_template_factory_debug', $html, 'Tribe__Events__Eventbrite__Template::the_tickets' );
        return apply_filters( 'tribe_events_eb_iframe_html', $html, $event_id, $post_id );
    add_filter( 'tribe_events_eventbrite_the_tickets', 'eb_iframe_show_even_if_private' );

    Bob (website support for duekerla)

    Posts: 6978 Topics: 2
    | Permalink
    Correct Answer

    Hi Bob,

    Thanks for reporting back and for sharing your solutions! Much appreciated! Great to hear it works!

    Since this is marked resolved I am going to close this ticket, but if you need anything else related to this topic or another please create a new ticket and we’ll be happy to help.


    PS: If you like our plugins, and you didn’t yet do so 🙂 we would be happy to receive a review in the repository. Thanks!

    PS2: We’d be also grateful if you would give us feedback on your satisfaction with support. Just click on one of the classy looking emojis below. 🙂 If you can spare a few words, that’s even better. Doublethanks!


    | Permalink

The topic ‘Sell Tickets Through Eventbrite While Not Publicizing Event on Eventbrite’ is closed to new replies.