{"id":1896517,"date":"2019-10-18T13:19:19","date_gmt":"2019-10-18T17:19:19","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/moving-the-eventbrite-tickets-box-2\/"},"modified":"2021-06-30T14:03:37","modified_gmt":"2021-06-30T18:03:37","slug":"moving-the-eventbrite-tickets-box","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/moving-the-eventbrite-tickets-box\/","title":{"rendered":"Moving the Eventbrite Tickets Box"},"content":{"rendered":"\n<p>By default, Eventbrite Tickets places the ticket form just under the event details or &#8220;meta&#8221; box. Though this is generally a nice position, some users may prefer to move it further up the page. Thankfully, doing so is pretty easy and in this tutorial, we&#8217;ll look at a useful snippet to help you do just that.<\/p>\n\n\n\n<p>The snippet below can be added to your theme&#8217;s <code>functions.php<\/code> file. Once it&#8217;s in place, it will move the ticket form to a position just above the event meta box.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_action( 'init', 'move_eb_ticket_form' );\n\nfunction move_eb_ticket_form() {\n\tif ( class_exists( 'Tribe__Events__Tickets__Eventbrite__Main' ) ) {\n\t\t$display_tickets = &#x5B; tribe( 'eventbrite.main' ), 'print_ticket_form' ];\n\t\tremove_action( 'tribe_events_single_event_after_the_meta', $display_tickets, 9 );\n\t\tadd_action( 'tribe_events_single_event_before_the_meta', $display_tickets );\n\t}\n}\n<\/pre><\/div>\n\n\n<p>You might prefer some other location on the event page. If so, you&#8217;ll need to change this line of the snippet:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; first-line: 7; title: ; notranslate\" title=\"\">\nadd_action( 'tribe_events_single_event_before_the_meta', $display_tickets );\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<p>Just as the first parameter (<code>tribe_events_single_event_before_the_meta<\/code>) suggests, this sets the ticket box to display on single events page&nbsp;<em>before the meta<\/em>&nbsp;(i.e. before the event details). If we wished to make it display before the event description we&#8217;d simply change that line to:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; first-line: 7; title: ; notranslate\" title=\"\">\nadd_action( 'tribe_events_single_event_before_the_content', $display_tickets );\n<\/pre><\/div>\n\n\n<p>Now you can move the tickets box wherever you need it on your events page! If you have any trouble using the snippet, you can always post to our <a href=\"http:\/\/support.theeventscalendar.com\">Help Desk<\/a> and we will do our best to help out.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default, Eventbrite Tickets places the ticket form just under the event details or &#8220;meta&#8221; box. Though this is generally a nice position, some users may prefer to move it further up the page. Thankfully, doing so is pretty easy and in this tutorial, we&#8217;ll look at a useful snippet to help you do just&#8230;<\/p>\n","protected":false},"author":17,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[121,79],"tags":[25,58],"stellar-product-taxonomy":[157],"class_list":["post-1896517","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-eventbrite-features","category-snippets","tag-customizations","tag-php","stellar-product-taxonomy-eventbrite-tickets"],"acf":[],"taxonomy_info":{"category":[{"value":121,"label":"Eventbrite Tickets"},{"value":79,"label":"Snippets"}],"post_tag":[{"value":25,"label":"Customizations"},{"value":58,"label":"PHP"}],"stellar-product-taxonomy":[{"value":157,"label":"Eventbrite Tickets"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Andras Guseo","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/andras\/"},"comment_info":0,"category_info":[{"term_id":121,"name":"Eventbrite Tickets","slug":"eventbrite-features","term_group":0,"term_taxonomy_id":121,"taxonomy":"category","description":"","parent":61,"count":7,"filter":"raw","term_order":"0","cat_ID":121,"category_count":7,"category_description":"","cat_name":"Eventbrite Tickets","category_nicename":"eventbrite-features","category_parent":61},{"term_id":79,"name":"Snippets","slug":"snippets","term_group":0,"term_taxonomy_id":79,"taxonomy":"category","description":"","parent":0,"count":136,"filter":"raw","term_order":"0","cat_ID":79,"category_count":136,"category_description":"","cat_name":"Snippets","category_nicename":"snippets","category_parent":0}],"tag_info":[{"term_id":25,"name":"Customizations","slug":"customizations","term_group":0,"term_taxonomy_id":25,"taxonomy":"post_tag","description":"","parent":0,"count":177,"filter":"raw","term_order":"0"},{"term_id":58,"name":"PHP","slug":"php","term_group":0,"term_taxonomy_id":58,"taxonomy":"post_tag","description":"","parent":20,"count":128,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896517","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1896517"}],"version-history":[{"count":1,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896517\/revisions"}],"predecessor-version":[{"id":1956302,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896517\/revisions\/1956302"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1896517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1896517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1896517"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1896517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}