{"id":971242,"date":"2015-06-19T05:18:23","date_gmt":"2015-06-19T12:18:23","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/"},"modified":"2015-06-22T08:36:56","modified_gmt":"2015-06-22T15:36:56","slug":"show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/","title":{"rendered":"Show price range or cheapest ticket next to title with tribe_get_cost"},"content":{"rendered":"<p>By default tribe_get_cost grabs the pricing for last ticket created with WooTickets and displays it next to the event title in the list view and single event view.<\/p>\n<p>While this is fine for single ticket events, it makes little sense for events with multiple tickets, as you&#8217;ll want to either display the price range or display the price of the cheapest ticket available. This makes a lot of sense in retail psychology, as people are more inclined to buy something that seems cheap (even if they buy a more expensive version).<\/p>\n<p>I recently applied this snippet from the knowledge base to properly sort my tickets:<\/p>\n<pre><code>function tribe_wootickets_custom_sort($p, $q) {\n        if ($p-&gt;price &lt; $q-&gt;price) return -1;\n        if ($p-&gt;price &gt; $q-&gt;price) return 1;\n        return 0;\n}<\/code><\/pre>\n<p>I also know how to modify the population of the field that contains tribe_get_cost, but I do not know how to modify the actual tribe_get_cost call in such a way that it will display a price range or the cheapest ticket like you can do with the wootickets_custom_sort function.<\/p>\n<p>It would be great if Modern Tribe could provide me with a snippet for both scenarios!<\/p>\n<p>Thanks in advance!<\/p>\n","protected":false},"template":"","class_list":["post-971242","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>Show price range or cheapest ticket next to title with tribe_get_cost -<\/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\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Show price range or cheapest ticket next to title with tribe_get_cost -\" \/>\n<meta property=\"og:description\" content=\"By default tribe_get_cost grabs the pricing for last ticket created with WooTickets and displays it next to the event title in the list view and single event view. While this is fine for single ticket events, it makes little sense for events with multiple tickets, as you&#8217;ll want to either display the price range or [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-06-22T15:36:56+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\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/\",\"name\":\"Show price range or cheapest ticket next to title with tribe_get_cost -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-06-19T12:18:23+00:00\",\"dateModified\":\"2015-06-22T15:36:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/#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\":\"Show price range or cheapest ticket next to title with tribe_get_cost\"}]},{\"@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":"Show price range or cheapest ticket next to title with tribe_get_cost -","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\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/","og_locale":"en_US","og_type":"article","og_title":"Show price range or cheapest ticket next to title with tribe_get_cost -","og_description":"By default tribe_get_cost grabs the pricing for last ticket created with WooTickets and displays it next to the event title in the list view and single event view. While this is fine for single ticket events, it makes little sense for events with multiple tickets, as you&#8217;ll want to either display the price range or [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/","article_modified_time":"2015-06-22T15:36:56+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\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/","name":"Show price range or cheapest ticket next to title with tribe_get_cost -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-06-19T12:18:23+00:00","dateModified":"2015-06-22T15:36:56+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/show-price-range-or-cheapest-ticket-next-to-title-with-tribe_get_cost\/#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":"Show price range or cheapest ticket next to title with tribe_get_cost"}]},{"@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\/971242","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":2,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/971242\/revisions"}],"predecessor-version":[{"id":971419,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/971242\/revisions\/971419"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=971242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}