{"id":1192741,"date":"2016-11-15T13:55:46","date_gmt":"2016-11-15T21:55:46","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/"},"modified":"2016-11-15T13:55:46","modified_gmt":"2016-11-15T21:55:46","slug":"moving-the-ticket-field-to-top-of-page","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/","title":{"rendered":"Moving the ticket field to top of page"},"content":{"rendered":"<p>I have some problems moving my ticket field to the top of the page. I found a post of this code:<\/p>\n<p>&lt;?php<br \/>\n\/*<br \/>\n * Moves the front-end ticket purchase form, accepts WP action\/hook and optional hook priority<br \/>\n *<br \/>\n * @param $ticket_location_action WP Action\/hook to display the ticket form at<br \/>\n * @param $ticket_location_priority Priority for the WP Action<br \/>\n *\/<br \/>\nfunction tribe_etp_move_tickets_purchase_form ( $ticket_location_action, $ticket_location_priority = 10 ) {<br \/>\n    $etp_classes = array(<br \/>\n        &#8216;Tribe__Tickets_Plus__Commerce__EDD__Main&#8217;,<br \/>\n    \/\/    &#8216;Tribe__Tickets_Plus__Commerce__Shopp__Main&#8217;, \/\/ As of ETP v4.0 Shopp will generate errors when referenced, if not active. Uncomment this line if you have Shopp Active<br \/>\n        &#8216;Tribe__Tickets_Plus__Commerce__WPEC__Main&#8217;,<br \/>\n        &#8216;Tribe__Tickets_Plus__Commerce__WooCommerce__Main&#8217;<br \/>\n    );<br \/>\n    foreach ( $etp_classes as $ticket_class ) {<br \/>\n        if ( ! class_exists( $ticket_class ) ) break;<br \/>\n        $form_display_function = array( $ticket_class::get_instance(), &#8216;front_end_tickets_form&#8217; );<br \/>\n        if ( has_action ( &#8216;tribe_events_single_event_after_the_meta&#8217;, $form_display_function ) ) {<br \/>\n            remove_action( &#8216;tribe_events_single_event_after_the_meta&#8217;, $form_display_function, 5 );<br \/>\n            add_action( $ticket_location_action, $form_display_function, $ticket_location_priority );<br \/>\n        }<br \/>\n    }<br \/>\n}<br \/>\n\/*<br \/>\n * TO MOVE THE TICKET FORM UNCOMMENT ONE OF THE FOLLOWING BY REMOVING THE \/\/<br \/>\n *\/<br \/>\n\/*<br \/>\n * Uncomment to Move Ticket Form Below Related Events<br \/>\n *\/<br \/>\n\/\/tribe_etp_move_tickets_purchase_form( &#8216;tribe_events_single_event_after_the_meta&#8217;, 20 );<br \/>\n\/*<br \/>\n * Uncomment to Move Ticket Form Below the Event Description<br \/>\n *\/<br \/>\n\/\/tribe_etp_move_tickets_purchase_form( &#8216;tribe_events_single_event_after_the_content&#8217;, 5 );<br \/>\ntribe_etp_move_tickets_purchase_form( &#8216;tribe_events_single_event_before_the_meta&#8217; );<br \/>\n\/*<br \/>\n * Uncomment to Move Ticket Form Above the Event Description<br \/>\n *\/<br \/>\n\/\/tribe_etp_move_tickets_purchase_form( &#8216;tribe_events_single_event_before_the_content&#8217; );<\/p>\n<p>And it worked fine till a update. If I put the code back in functions.php my site turns blanc&#8230; please help me!<\/p>\n","protected":false},"template":"","class_list":["post-1192741","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Moving the ticket field to top of page -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Moving the ticket field to top of page -\" \/>\n<meta property=\"og:description\" content=\"I have some problems moving my ticket field to the top of the page. I found a post of this code: &lt;?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 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/\",\"name\":\"Moving the ticket field to top of page -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-11-15T21:55:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ticket Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Event Tickets Plus\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Moving the ticket field to top of page\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Moving the ticket field to top of page -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/","og_locale":"en_US","og_type":"article","og_title":"Moving the ticket field to top of page -","og_description":"I have some problems moving my ticket field to the top of the page. I found a post of this code: &lt;?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 [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/","name":"Moving the ticket field to top of page -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-11-15T21:55:46+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-the-ticket-field-to-top-of-page\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Ticket Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/"},{"@type":"ListItem","position":4,"name":"Event Tickets Plus","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/"},{"@type":"ListItem","position":5,"name":"Moving the ticket field to top of page"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1192741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1192741\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1192741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}