{"id":1232330,"date":"2017-02-09T12:50:24","date_gmt":"2017-02-09T20:50:24","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/override-ticket-meta-template\/"},"modified":"2017-02-10T10:02:41","modified_gmt":"2017-02-10T18:02:41","slug":"override-ticket-meta-template","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/override-ticket-meta-template\/","title":{"rendered":"Override ticket meta template"},"content":{"rendered":"<p>Hi, I was trying to replace some tickets meta field templates, the text.php to be specific.<br \/>\nOn the themer&#8217;s guide you say that we can replace the template by putting the text.php inside the meta folder on my child theme. I&#8217;ve seen that the method that renders the field is on this file: event-tickets-plus\/src\/Tribe\/Meta\/Field\/Abstract_Field.php<\/p>\n<p>That method calls to render_field method and there you are not looking for a template on my child theme and your are directly using the theme inside plugin&#8217;s folder. <\/p>\n<p>So on the render_field method you can change this:<br \/>\n<code>include Tribe__Tickets_Plus__Main::instance()-&gt;plugin_path . &quot;src\/views\/meta\/{$template}&quot;;<\/code><br \/>\nwith this:<\/p>\n<pre><code>$file = Tribe__Events__Templates::getTemplateHierarchy( &quot;meta\/{$template}&quot; );\r\n\r\n\t\t\tif ( ! file_exists( $file ) ) {\r\n\t\t\t\t$file = Tribe__Tickets_Plus__Main::instance()-&gt;plugin_path . &quot;src\/views\/meta\/{$template}&quot;;\r\n\t\t\t}\r\n\r\n\t\t\tinclude $file;<\/code><\/pre>\n<p>That way the method will look for a template on my child theme. I&#8217;ve tried this and it works. Without it, the themer&#8217;s guide explanation for this templates is not working.<\/p>\n","protected":false},"template":"","class_list":["post-1232330","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>Override ticket meta template -<\/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\/override-ticket-meta-template\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Override ticket meta template -\" \/>\n<meta property=\"og:description\" content=\"Hi, I was trying to replace some tickets meta field templates, the text.php to be specific. On the themer&#8217;s guide you say that we can replace the template by putting the text.php inside the meta folder on my child theme. I&#8217;ve seen that the method that renders the field is on this file: event-tickets-plus\/src\/Tribe\/Meta\/Field\/Abstract_Field.php That [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/override-ticket-meta-template\/\" \/>\n<meta property=\"article:modified_time\" content=\"2017-02-10T18:02:41+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=\"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\/override-ticket-meta-template\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/override-ticket-meta-template\/\",\"name\":\"Override ticket meta template -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-02-09T20:50:24+00:00\",\"dateModified\":\"2017-02-10T18:02:41+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/override-ticket-meta-template\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/override-ticket-meta-template\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/override-ticket-meta-template\/#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\":\"Override ticket meta template\"}]},{\"@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":"Override ticket meta template -","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\/override-ticket-meta-template\/","og_locale":"en_US","og_type":"article","og_title":"Override ticket meta template -","og_description":"Hi, I was trying to replace some tickets meta field templates, the text.php to be specific. On the themer&#8217;s guide you say that we can replace the template by putting the text.php inside the meta folder on my child theme. I&#8217;ve seen that the method that renders the field is on this file: event-tickets-plus\/src\/Tribe\/Meta\/Field\/Abstract_Field.php That [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/override-ticket-meta-template\/","article_modified_time":"2017-02-10T18:02:41+00:00","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\/override-ticket-meta-template\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/override-ticket-meta-template\/","name":"Override ticket meta template -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-02-09T20:50:24+00:00","dateModified":"2017-02-10T18:02:41+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/override-ticket-meta-template\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/override-ticket-meta-template\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/override-ticket-meta-template\/#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":"Override ticket meta template"}]},{"@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\/1232330","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\/1232330\/revisions"}],"predecessor-version":[{"id":1232963,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1232330\/revisions\/1232963"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1232330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}