Moving the ticket field to top of page

Home Forums Ticket Products Event Tickets Plus Moving the ticket field to top of page

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1192741
    Cees
    Participant

    I have some problems moving my ticket field to the top of the page. I found a post of this code:

    <?php
    /*
    * 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 ) {
    $etp_classes = array(
    ‘Tribe__Tickets_Plus__Commerce__EDD__Main’,
    // ‘Tribe__Tickets_Plus__Commerce__Shopp__Main’, // As of ETP v4.0 Shopp will generate errors when referenced, if not active. Uncomment this line if you have Shopp Active
    ‘Tribe__Tickets_Plus__Commerce__WPEC__Main’,
    ‘Tribe__Tickets_Plus__Commerce__WooCommerce__Main’
    );
    foreach ( $etp_classes as $ticket_class ) {
    if ( ! class_exists( $ticket_class ) ) break;
    $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 );
    tribe_etp_move_tickets_purchase_form( ‘tribe_events_single_event_before_the_meta’ );
    /*
    * Uncomment to Move Ticket Form Above the Event Description
    */
    //tribe_etp_move_tickets_purchase_form( ‘tribe_events_single_event_before_the_content’ );

    And it worked fine till a update. If I put the code back in functions.php my site turns blanc… please help me!

    #1193029
    Andras
    Keymaster

    Hi Cees,

    Thanks for reaching out to us! I’m sorry you are having an issue with moving the ticket form.

    What did you update which made the site turn blank? Was it The Events Calendar or some other plugin? Maybe a theme?

    Did you manage to get your site back? If you still need help fixing the White Screen of Death, then I suggest these articles:

    https://codex.wordpress.org/Common_WordPress_Errors

    http://www.wpbeginner.com/wp-tutorials/how-to-fix-the-wordpress-white-screen-of-death/

     

    For moving the ticket forms we have a nice knowledgebase article:

    http://www.wpbeginner.com/wp-tutorials/how-to-fix-the-wordpress-white-screen-of-death/

     

    Let me know if these help.

    Cheers,
    Andras

    #1193032
    Cees
    Participant

    Hi András,

    My site is back online! Thnx for asking.

    I only have like 10 events a year so my site updates are sometime a bit behind. I had manage to move the ticket form to the top of the event page using this code found on your forum, see link: https://gist.github.com/niconerd/ea28fecb1e1b6aef4171

    It didn’t give any problems till june or somewhere round that time…

    After that that code didn’t work, and I reach out to you for help and get this link as a replay: https://theeventscalendar.com/knowledgebase/moving-rsvp-ticket-forms/

    But this doesn’t work out for if I put that code in functions.php my site turns blanc 🙁

    Hope there is a easy way to get the ticket form on top of my event pages.

    #1193142
    Andras
    Keymaster

    Hello again,

    I’m sorry 🙂 I wanted to share with you the link to that knowledgebase article as well, but I guess I forgot to copy it first, and just pasted in the one before. :blush:

     

    I’m sorry to hear the code didn’t work out. Could you please clarify which code it was which turned your site blank?

    Regarding pasting that code into your functions.php file, make sure that if functions.php already begins with < ? php then make sure you don’t copy that again. Only one at the beginning of the file is enough.

     

    I would also like to ask you to share your system information with me. That might also shed some light on the issue. Here’s a nice guide for that: https://theeventscalendar.com/knowledgebase/sharing-sys-info/

    Thanks and cheers,
    Andras

    #1203144
    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 ‘Moving the ticket field to top of page’ is closed to new replies.