Home › Forums › Welcome! › Pre-Sales Questions › Attempting to move Tickets under Event Description
- This topic has 2 replies, 2 voices, and was last updated 10 years, 2 months ago by
Support Droid.
-
AuthorPosts
-
March 1, 2016 at 3:14 pm #1084068
Steven Harris
GuestI tried to follow the knowledgebase directions for moving the tickets below the event description, but got an error on the functions.php when attempting to save the file.


The code I used was:
<?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 ); /* * Uncomment to Move Ticket Form Above the Event Description */ //tribe_etp_move_tickets_purchase_form( 'tribe_events_single_event_before_the_content' );I put it at the bottom of the functions.php. I’m using the Salient theme. I’m not exactly sure that I put the code in the right place. It worked, after giving me an error message(screenshot 1), but then the site crashed and showed the second error (screenshot 2).
Thank you for your help!!
March 2, 2016 at 8:32 am #1084367George
ParticipantHey Steven,
At the start of your code snippet is an opening PHP tag, like this:
<?php
If you remove this from your snippet, does anything improve?
— George
March 17, 2016 at 9:35 am #1090330Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Attempting to move Tickets under Event Description’ is closed to new replies.
