Move Ticket Section to top

Home Forums Ticket Products Event Tickets Plus Move Ticket Section to top

  • This topic has 5 replies, 4 voices, and was last updated 9 years, 1 month ago by Gravitate Core Services.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1228636

    Hello,
    We are using The Events Calendar with Event Brite addon. Currently by default the events calendar adds a ticket section to the bottom of a single event page below venue information. We would like to move that up to either above the description or below the description. Can you please point us in the right direction for this, we do not need a deep breakdown of how to go about it just let us know what files we will need to modify in either the events calendar or the Eventbrite addon.

    Thanks

    #1229148
    Nico
    Member

    Hi there,

    Thanks for getting in touch about this!

    You’ll find the instructions to do this in the following article → Moving the Eventbrite Tickets box

    Give that code a try and let me know if it works for you,
    Have a great weekend,
    Nico

    #1232373

    Hey Nico,
    This worked like a charm if I could just add on to this ticket and ask one more thing. I need to increase the height of the ticket box, I used the function snippet I found in the knowledge base but it does not seem to be working. Can you tell me if the below is correct for my function file and if I may be missing something ?

    
    
    // BELOW SNIPET IS USED TO MOVE TICKET BOX ABOVE CONTENT ON EVENT PAGE 
    
    add_action( 'init', 'move_eb_ticket_form' );
     
    function move_eb_ticket_form() {
        $display_tickets = array( tribe( 'eventbrite.main' ), 'print_ticket_form' );
        remove_action( 'tribe_events_single_event_after_the_meta', $display_tickets, 9 );
        add_action( 'tribe_events_single_event_before_the_meta', $display_tickets );
    }
    
    // BELOW SNIPPET IS USED TO CHANGE HEIGHT OF EVENT TICKET BOX
    
    add_filter('tribe_template_factory_debug', 'change_eb_iframe_height');
     
    function change_eb_iframe_height($html) {
    if (false === strpos($html, 'eventbrite-ticket-embed')) return $html;
    return str_replace('style="height:900px!important;', 'style="height:900px!important;', $html);
    }
    #1233176
    Nico
    Member

    Thanks for the heads-up! Stocked to hear that worked 🙂

    Regarding the iframe height, try replacing that snippet with the following code:

    /*
    * The Events Calendar snippet
    * Change EventBrite tickets iframe height
    */
    function tribe_change_eb_iframe_height( $html, $event_id, $post_id ) {

    if (false === strpos($html, 'eventbrite-ticket-embed')) return $html;

    $new_height = 400;

    return str_replace('style="height:200px;', 'style="height:' . $new_height . 'px;', $html);
    }

    add_filter( 'tribe_events_eb_iframe_html', 'tribe_change_eb_iframe_height', 10, 3);

    I went ahead and update the article containing the snippet!

    Please let me know if this works for you,
    Best,
    Nico

    #1249484
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Move Ticket Section to top’ is closed to new replies.