Home › Forums › Ticket Products › Event Tickets Plus › Moving the Tickets Plus form 'code' crashes the site
- This topic has 5 replies, 2 voices, and was last updated 10 years, 3 months ago by
George.
-
AuthorPosts
-
January 24, 2016 at 4:44 pm #1061434
Chris
ParticipantI’ve been trying to move the tickets above the event details. All the forum posts direct to this page https://theeventscalendar.com/knowledgebase/moving-the-ticket-form/
However when applying the below code, my website crashes – the whole site is white. Which I resolve by editing the Function.php file back to the way it was.
/*
* Uncomment to Move Ticket Form Below the Event Description
*/
//tribe_etp_move_tickets_purchase_form( ‘tribe_events_single_event_after_the_content’, 5 );I’m using the Salient Child Theme.
Also, strangely the code to move the RSVP below DOES work.
/**
* Move RSVP Tickets form in events template
*/
if (class_exists(‘Tribe__Tickets__RSVP’)) {
remove_action( ‘tribe_events_single_event_after_the_meta’, array( Tribe__Tickets__RSVP::get_instance(), ‘front_end_tickets_form’ ), 5 );
add_action( ‘tribe_events_single_event_before_the_meta’, array( Tribe__Tickets__RSVP::get_instance(), ‘front_end_tickets_form’ ), 5 );
}The page I’m currently working on is http://lunapark.com.au/event/matt-harveys-just-for-funny-melbourne-comedy-festival/2016-02-25/
But it is relevant for all the events here http://lunapark.com.au/events/
I’m a PHP coder but can work most things out.
cheers
-ColbyJanuary 25, 2016 at 5:58 am #1061543George
ParticipantHi @Colby,
We unfortunately cannot provide any support for customizations, or problems that arise from making customizations π
Please see the “Product Support” section of this page for more information β http://theeventscalendar.com/terms
Now, despite the notice I wrote above, if you can copy and paste your entire, un-edited functions.php file into a Gist at http://gist.github.com, and then share a link to that Gist, I will gladly take a look and try to spot the problem!
π
Cheers,
GeorgeJanuary 26, 2016 at 4:42 pm #1062780Chris
ParticipantThis is the child theme that I am using
https://gist.github.com/anonymous/6ff4af49dee83bc3f177This is the parent theme’s function.php
https://gist.github.com/anonymous/26919729a33e9d631f16January 27, 2016 at 9:59 am #1063253George
ParticipantHi Colby,
Thanks for sharing this.
1. You have the same code to move the form in your child-theme functions.php twice. Why is this? Does anything improve if you remove the duplicate block of code?
2. If “No” for #1, then what if you remove the code from your child-theme functions.php and place it back in your parent theme’s functions.php file?
3. If “no” for #2, then what if you remove the code from your parent-theme, place it back into your child theme, and then head to your site’s wp-config.php file and change this line of code:
define('WP_DEBUG', false);to this:
define('WP_DEBUG', true);That will display PHP errors if any exist, which might be quite useful here. Once you’ve made this change, take another look at your site. Instead of just a blank white screen, there should be error text. If so, please copy and paste the entire text of the error here on this thread.
4. If the steps in #3 here do not show error text, then do what you did in step #2 here βΒ take the code out of the child-theme and put it into the parent theme, and then see if error text shows on the site again instead of a blank white screen.
This process here is a thorough one that will hopefully reveal the problem. I could not spot the issue from my overview of the files you shared.
Let us know what you find!
Thank you,
GeorgeFebruary 1, 2016 at 7:51 pm #1066079Chris
ParticipantI have fixed it, apparently I needed to use this whole code featured on this link.
https://theeventscalendar.com/knowledgebase/moving-the-ticket-form/
Not just the selection I grabbed.
February 1, 2016 at 9:26 pm #1066088George
ParticipantAwesome! Thank you for the update Colby. Glad you’ve got this fixed.
I will close up this thread for now, but please open a new thread any time if other questions arise.
Best of luck with your project!
George -
AuthorPosts
- The topic ‘Moving the Tickets Plus form 'code' crashes the site’ is closed to new replies.
