Move Ticket Form from Sidebar to Main Area

Home Forums Ticket Products Event Tickets Plus Move Ticket Form from Sidebar to Main Area

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1139663
    Eric
    Participant

    I tried to access the URL listed below “Moving the Ticket Form” and it keeps coming up as an invalid link and I need to get this figured out. Can you point me to the correct URL please?

    Thanks!

    Moving Ticket Form Location

    #1139941
    Nico
    Member

    Hi Eric,

    Thanks for getting in touch! The URL is working for me → https://theeventscalendar.com/knowledgebase/moving-the-ticket-form/

    Just in case I’ll paste the snippet in the article:

    /*
    * Moves the front-end ticket purchase form, accepts WP action/hook and optional hook priority
    *
    * @param $ticket_location_action WP Action/hook to display the ticket form at
    * @param $ticket_location_priority Priority for the WP Action
    */
    function tribe_etp_move_tickets_purchase_form ( $ticket_location_action, $ticket_location_priority = 10 ) {
    if ( ! class_exists( 'Tribe__Tickets__Tickets') ) return;
    $etp_classes = array(
    'Easy_Digital_Downloads' => 'Tribe__Tickets_Plus__Commerce__EDD__Main',
    'ShoppVersion' => 'Tribe__Tickets_Plus__Commerce__Shopp__Main',
    'WP_eCommerce' => 'Tribe__Tickets_Plus__Commerce__WPEC__Main',
    'Woocommerce' => 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main',
    'Tribe__Tickets__Tickets' => 'Tribe__Tickets__RSVP',
    );
    foreach ( $etp_classes as $ecommerce_class => $ticket_class) {
    if ( ! class_exists( $ecommerce_class ) || ! class_exists( $ticket_class ) ) continue;
    $form_display_function = array( $ticket_class::get_instance(), 'front_end_tickets_form' );
    if ( has_action ( 'tribe_events_single_event_after_the_meta', $form_display_function ) ) {
    remove_action( 'tribe_events_single_event_after_the_meta', $form_display_function, 5 );
    add_action( $ticket_location_action, $form_display_function, $ticket_location_priority );
    }
    }
    }
    /*
    * TO MOVE THE TICKET FORM UNCOMMENT ONE OF THE FOLLOWING BY REMOVING THE //
    */
    /*
    * Uncomment to Move Ticket Form Below Related Events
    */
    //tribe_etp_move_tickets_purchase_form( 'tribe_events_single_event_after_the_meta', 20 );
    /*
    * Uncomment to Move Ticket Form Below the Event Description
    */
    //tribe_etp_move_tickets_purchase_form( 'tribe_events_single_event_after_the_content', 5 );
    /*
    * Uncomment to Move Ticket Form Above the Event Description
    */
    //tribe_etp_move_tickets_purchase_form( 'tribe_events_single_event_before_the_content' );

    Please let me know if you can access it now,
    Best,
    Nico

    #1139944
    Eric
    Participant

    Thanks for posting that. The link still isn’t working for me and I tried 3 different browsers (I’m finding that to be the case with most knowledgeable links I’m coming across.

    Where does the snippet go? I don’t see a spot to put it in the settings area of the events section.

    • This reply was modified 9 years, 9 months ago by Eric.
    #1140036
    Nico
    Member

    Thanks for the report Eric, it should be fixed now for some reason it was set as draft (this is why I was able to see it but you didn’t) so re-publishing the KB article should make ir right again. Please re-check and sorry for the hassle!

    The snippet should go in your theme’s (or child theme’s) functions.php file, be sure to read the instructions in the code to make it work for your e-commerce platform.

    Best,
    Nico

    #1148243
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Move Ticket Form from Sidebar to Main Area’ is closed to new replies.