{"id":1082053,"date":"2016-02-25T09:14:51","date_gmt":"2016-02-25T17:14:51","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-events-ticket-form-crashes-entire-website\/"},"modified":"2016-03-25T09:35:07","modified_gmt":"2016-03-25T16:35:07","slug":"moving-events-ticket-form-crashes-entire-website","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-events-ticket-form-crashes-entire-website\/","title":{"rendered":"Moving Events Ticket form crashes entire website"},"content":{"rendered":"<p>I recently tried to use the code to move the Events Tickets form to above the content (or anywhere, really) using the code:<\/p>\n<pre><code>\/*\n * Moves the front-end ticket purchase form, accepts WP action\/hook and optional hook priority\n *\n * @param $ticket_location_action WP Action\/hook to display the ticket form at\n * @param $ticket_location_priority Priority for the WP Action\n *\/\nfunction tribe_etp_move_tickets_purchase_form ( $ticket_location_action, $ticket_location_priority = 10 ) {\n    $etp_classes = array(\n        &#039;Tribe__Tickets_Plus__Commerce__EDD__Main&#039;,\n    \/\/    &#039;Tribe__Tickets_Plus__Commerce__Shopp__Main&#039;, \/\/ As of ETP v4.0 Shopp will generate errors when referenced, if not active. Uncomment this line if you have Shopp Active\n        &#039;Tribe__Tickets_Plus__Commerce__WPEC__Main&#039;,\n        &#039;Tribe__Tickets_Plus__Commerce__WooCommerce__Main&#039;\n    );\n    foreach ( $etp_classes as $ticket_class ) {\n        if ( ! class_exists( $ticket_class ) ) break;\n        $form_display_function = array( $ticket_class::get_instance(), &#039;front_end_tickets_form&#039; );\n        if ( has_action ( &#039;tribe_events_single_event_after_the_meta&#039;, $form_display_function ) ) {\n            remove_action( &#039;tribe_events_single_event_after_the_meta&#039;, $form_display_function, 5 );\n            add_action( $ticket_location_action, $form_display_function, $ticket_location_priority );\n        }\n    }\n}\n\n\/*\n * TO MOVE THE TICKET FORM UNCOMMENT ONE OF THE FOLLOWING BY REMOVING THE \/\/\n *\/\n\n\/*\n * Uncomment to Move Ticket Form Below Related Events\n *\/\n\/\/tribe_etp_move_tickets_purchase_form( &#039;tribe_events_single_event_after_the_meta&#039;, 20 );\n\n\/*\n * Uncomment to Move Ticket Form Below the Event Description\n *\/\n\/\/tribe_etp_move_tickets_purchase_form( &#039;tribe_events_single_event_after_the_content&#039;, 5 );\ntribe_etp_move_tickets_purchase_form( \u2018tribe_events_single_event_before_the_meta\u2019 );\n\n\/*\n * Uncomment to Move Ticket Form Above the Event Description\n *\/\n\/\/tribe_etp_move_tickets_purchase_form( &#039;tribe_events_single_event_before_the_content&#039; );<\/code><\/pre>\n<p>This has the unfortunate effect of giving the page a white screen of death.<\/p>\n<p>If I comment out all of the calls to the function, the site is fine but there is no movement of the ticket form (obviously). As soon as I uncomment ANY of the calls to the function, it causes the page to crash. I have tried disabling all of my plugins except for Woocommerce, TEC, TEC PRO, ET &amp; ET Plus, but still get a crash on the page.<\/p>\n<p>Any help?<\/p>\n<p>Using:<br \/>\nAvada Theme 3.9.3<br \/>\nWoocommerce 2.5.2<br \/>\nThe Events Calendar 4.0.6<br \/>\nThe Events Calendar PRO 4.0.6<br \/>\nEvent Tickets 4.0.5<br \/>\nEvent Tickets Plus 4.0.5<\/p>\n","protected":false},"template":"","class_list":["post-1082053","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 Events Ticket form crashes entire website -<\/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-events-ticket-form-crashes-entire-website\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Moving Events Ticket form crashes entire website -\" \/>\n<meta property=\"og:description\" content=\"I recently tried to use the code to move the Events Tickets form to above the content (or anywhere, really) using the code: \/* * 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 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-events-ticket-form-crashes-entire-website\/\" \/>\n<meta property=\"article:modified_time\" content=\"2016-03-25T16:35:07+00:00\" \/>\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=\"2 minutes\" \/>\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-events-ticket-form-crashes-entire-website\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-events-ticket-form-crashes-entire-website\/\",\"name\":\"Moving Events Ticket form crashes entire website -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-02-25T17:14:51+00:00\",\"dateModified\":\"2016-03-25T16:35:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-events-ticket-form-crashes-entire-website\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-events-ticket-form-crashes-entire-website\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-events-ticket-form-crashes-entire-website\/#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 Events Ticket form crashes entire website\"}]},{\"@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 Events Ticket form crashes entire website -","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-events-ticket-form-crashes-entire-website\/","og_locale":"en_US","og_type":"article","og_title":"Moving Events Ticket form crashes entire website -","og_description":"I recently tried to use the code to move the Events Tickets form to above the content (or anywhere, really) using the code: \/* * 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 [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-events-ticket-form-crashes-entire-website\/","article_modified_time":"2016-03-25T16:35:07+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-events-ticket-form-crashes-entire-website\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-events-ticket-form-crashes-entire-website\/","name":"Moving Events Ticket form crashes entire website -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-02-25T17:14:51+00:00","dateModified":"2016-03-25T16:35:07+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-events-ticket-form-crashes-entire-website\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-events-ticket-form-crashes-entire-website\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/moving-events-ticket-form-crashes-entire-website\/#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 Events Ticket form crashes entire website"}]},{"@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\/1082053","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":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1082053\/revisions"}],"predecessor-version":[{"id":1082248,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1082053\/revisions\/1082248"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1082053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}