Moving the Eventbrite Tickets box

Home Forums Ticket Products Eventbrite Tickets Moving the Eventbrite Tickets box

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #969823
    nthomas
    Participant

    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!

    #969910
    Nico
    Member

    Hi 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,
    Nico

    PS: The ‘functions.php’ file is located at ‘wp-content/themes/your_active_theme/functions.php’.

    #970146
    Nico
    Member

    Hey 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,
    Nico

    #970161
    nthomas
    Participant

    Hi 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?

    #970168
    nthomas
    Participant

    Hi 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!

    #970171
    nthomas
    Participant

    Also, 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!

    #970175
    nthomas
    Participant

    One 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?

    #970766
    Nico
    Member

    Hi 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,
    Nico

    #974781
    nthomas
    Participant

    Hi 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!

    #975132
    Nico
    Member

    Hi nthomas,

    It should work fine for 3.10.1 as well 🙂

    Good luck with that, and please let me know how it goes,
    Thanks,
    Nico

    #984878
    nthomas
    Participant

    Hi 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!

    #985145
    Nico
    Member

    Hi nthomas,

    Yeap, the code should move the tickets box up in 3.10.1.

    Please let me know if this works,
    Thanks,
    Nico

    #986438
    Stephanie
    Participant

    Hi – 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

    #986696
    Nico
    Member

    Hey 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,
    Nico

    #986857
    Stephanie
    Participant

    That worked – thanks Nico!

Viewing 15 posts - 1 through 15 (of 18 total)
  • The topic ‘Moving the Eventbrite Tickets box’ is closed to new replies.