Home › Forums › Ticket Products › Eventbrite Tickets › Moving the Eventbrite Tickets box
- This topic has 17 replies, 3 voices, and was last updated 8 years, 9 months ago by Nico.
-
AuthorPosts
-
June 16, 2015 at 11:07 am #969823nthomasParticipant
Hi Modern Tribe,
I’d like to move the Eventbrite tickets form to go above the meta box on our organization’s events.
I’ve accessed the knowledge base: https://theeventscalendar.com/knowledgebase/moving-the-eventbrite-tickets-box/However, since I’m not a coder, I don’t know exactly how to locate our theme’s functions.php file to add the code.
Is there a video tutorial I can access? Or could you simply direct me step by step to the functions.php file?
Thanks!
June 16, 2015 at 4:27 pm #969910NicoMemberHi nthomas,
Thanks for reaching out on us! Of course I can outline the steps for you 🙂
1. Go to ‘WordPress backend > Appearence > Editor’.
2. Click on ‘Theme Functions’ from the right sidebar.
3. Scroll down to the end of the file shown in the ‘editor’.
4. Paste the code below at the end of the file in the ‘editor’:
add_action( 'init', 'move_eb_ticket_form' );function move_eb_ticket_form() {
$callback = array( Event_Tickets_PRO::instance(), 'displayEventBriteTicketForm' );
remove_action( 'tribe_events_single_event_after_the_meta', $callback, 9 );
add_action( 'tribe_events_single_event_before_the_meta', $callback );
}
5. Click ‘Update File’.
6. Check if this works on the site.Please let me know how this goes,
Best,
NicoPS: The ‘functions.php’ file is located at ‘wp-content/themes/your_active_theme/functions.php’.
June 17, 2015 at 9:56 am #970146NicoMemberHey nthomas,
Just realized that the snippet I provided will work fine for version 3.9 of EventBrite Tickets, but if you update to 3.10 you’ll need to use this updated snippet instead:
add_action( 'init', 'move_eb_ticket_form' );function move_eb_ticket_form() {
$callback = array( 'Tribe__Events__Tickets__Eventbrite__Main', 'print_ticket_form' );
remove_action( 'tribe_events_single_event_after_the_meta', $callback, 9 );
add_action( 'tribe_events_single_event_before_the_meta', $callback );
}
Thanks,
NicoJune 17, 2015 at 10:26 am #970161nthomasParticipantHi Nico, I just updated to 3.10 and followed the steps.
I got this message after I hit Update File:
Warning: Cannot modify header information – headers already sent by (output started at /home/nthomas/public_html/wp-content/themes/Corporative/functions.php:338) in /home/nthomas/public_html/wp-includes/pluggable.php on line 1196
What is next?
June 17, 2015 at 10:37 am #970168nthomasParticipantHi Nico,
Can you show me exactly where in the editor field I should pasted the code? I did paste it at the end of the file, after all the other existing code. But wondering if this was incorrect, causing the error?
Thanks!
June 17, 2015 at 10:42 am #970171nthomasParticipantAlso, whenever I make any backend content edits to WordPress (not code in the editor), whenever I hit Update, I continue to get this error message: Warning: Cannot modify header information – headers already sent by (output started at /home/nthomas/public_html/wp-content/themes/Corporative/functions.php:339) in /home/nthomas/public_html/wp-includes/pluggable.php on line 1196
Please help!
June 17, 2015 at 10:45 am #970175nthomasParticipantOne more thing I noticed, at the top right hand corner, Select Theme to Edit is set at Corporative.
But the Dropdown has a few options: Twenty fifteen, twenty fourteen, twenty thirteen, twenty twelve.
Was Corporative the correct theme to edit?
June 17, 2015 at 2:11 pm #970766NicoMemberHi nthomas,
Thanks for the follow-up! I’m sorry you’re getting that error, let’s try to figure out what’s causing it.
Please make sure you are not pasting the code after a php closing tag (?>), if that’s the case please move the snippet above it. I made a screenshot for you to see where to paste the code: https://cloudup.com/c0x3zxW5cf5. If your active theme is ‘Corporative’, then it’s the right theme to edit (you can check on that in ‘WordPress backend > Appearence > Themes’).
If you are still having problems please create a pastebin with the content of ‘functions.php’ file of the ‘Corporative’ theme (if that’s the theme you would like to use), and I’ll make the edit for you to paste in WordPress editor.
Another way of editing the ‘functions.php’ file is to download it via FTP, edit it locally and then re-upload it. You will find the file in ‘wp-content/themes/your_active_theme/functions.php’. Do you think you can manage to do so?
Best,
NicoJuly 2, 2015 at 11:41 am #974781nthomasParticipantHi Nico.
I actually have not implemented this snippet yet, but am ready to do so.
And you are correct, I was probably pasting the snippet after the php closing tag, causing the error.
I just updated to the latest version, so I want to confirm, can I use the snippet you indicated with version 3.10.1? Or will you need to provide a new snippet?
Thanks!
July 3, 2015 at 5:43 am #975132NicoMemberHi nthomas,
It should work fine for 3.10.1 as well 🙂
Good luck with that, and please let me know how it goes,
Thanks,
NicoJuly 8, 2015 at 12:59 pm #984878nthomasParticipantHi Nico,
To answer the question you asked in my other thread, it looks like we have version 3.10.1 of Events Calendar, Events Calendar PRO, and Eventbrite tickets. I’ll let you know if I’m able to move the tickets box up once I implement the snippet.
Thanks!
July 9, 2015 at 11:31 am #985145NicoMemberHi nthomas,
Yeap, the code should move the tickets box up in 3.10.1.
Please let me know if this works,
Thanks,
NicoJuly 14, 2015 at 3:37 pm #986438StephanieParticipantHi – thanks for this snippet. It worked in moving my ticket box up where I wanted it, but it still shows the ticket box below the meta as well. Does something else need to be changed for the newer version to remove that?
Thanks
July 15, 2015 at 11:20 am #986696NicoMemberHey Stephanie,
Can you try this updated version of the snippet?
add_action( 'init', 'move_eb_ticket_form' );function move_eb_ticket_form() {
$callback = array( Tribe__Events__Tickets__Eventbrite__Main::instance(), 'print_ticket_form' );
remove_action( 'tribe_events_single_event_after_the_meta', $callback, 9 );
add_action( 'tribe_events_single_event_before_the_meta', $callback );
}
nthomas, please be aware of this also!
Best,
NicoJuly 15, 2015 at 6:15 pm #986857StephanieParticipantThat worked – thanks Nico!
-
AuthorPosts
- The topic ‘Moving the Eventbrite Tickets box’ is closed to new replies.