{"id":1610059,"date":"2018-08-30T12:19:33","date_gmt":"2018-08-30T19:19:33","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/event-cost-not-displaying\/"},"modified":"2018-08-30T12:19:33","modified_gmt":"2018-08-30T19:19:33","slug":"event-cost-not-displaying","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/event-cost-not-displaying\/","title":{"rendered":"Event Cost not displaying"},"content":{"rendered":"<p>I created a php snippet to display a list of events, but the event cost isn&#8217;t showing up. Here&#8217;s my code:<\/p>\n<pre><code>&lt;?php\n\n$query = new WP_Query( array(\n\t&#039;post_type&#039; =&gt; &#039;tribe_events&#039; ,\n\t&#039;post_status&#039;=&gt;&#039;publish&#039;,\n  \t&#039;post_type&#039;=&gt;array(TribeEvents::POSTTYPE),\n\t\/\/order by startdate from newest to oldest\n  \t&#039;meta_key&#039;=&gt;&#039;_EventStartDate&#039;,\n  \t&#039;orderby&#039;=&gt;&#039;_EventStartDate&#039;,\n \t&#039;order&#039;=&gt;&#039;ASC&#039;,\n \t&#039;eventDisplay&#039;=&gt;&#039;custom&#039;,\n\t&#039;posts_per_page&#039; =&gt; -1 ,\n\t&#039;tribe_events_cat&#039; =&gt; &#039;fall-winter-spring&#039;,\n\n ) );\n\nif ($query-&gt;have_posts())\n{\n\twhile ($query-&gt;have_posts()) : $query-&gt;the_post(); ?&gt;\n&lt;div class=&quot;flex_column av_one_fourth first  avia-builder-el-1  el_after_av_textblock  el_before_av_three_fourth&quot;&gt;\n\n    &lt;div class=&quot;avia-image-container  av-styling-  avia-builder-el-2  avia-builder-el-no-sibling  avia-align-center &quot; itemscope=&quot;itemscope&quot; itemtype=&quot;https:\/\/schema.org\/ImageObject&quot;&gt;\n    \n        &lt;div class=&quot;avia-image-container-inner&quot;&gt;\n        &lt;?php echo tribe_event_featured_image(null, &#039;square&#039;) ?&gt;\t        \n        &lt;\/div&gt;\n    \n    &lt;\/div&gt;\n\n&lt;\/div&gt;\n\n&lt;div class=&quot;flex_column av_three_fourth   avia-builder-el-3  el_after_av_one_fourth  el_before_av_hr&quot;&gt;\n    &lt;section class=&quot;av_textblock_section&quot; itemscope=&quot;itemscope&quot; itemtype=&quot;https:\/\/schema.org\/CreativeWork&quot;&gt;\n        &lt;div class=&quot;avia_textblock &quot; itemprop=&quot;text&quot;&gt;\n\t\t\t&lt;?php do_action( &#039;tribe_events_list_widget_before_the_event_title&#039; ); ?&gt;\n           \t&lt;h2 class=&quot;event-title&quot;&gt;&lt;a href=&quot;&lt;?php echo tribe_get_event_link(); ?&gt;&quot; rel=&quot;bookmark&quot;&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/h2&gt;\n\t\t\t&lt;?php do_action( &#039;tribe_events_list_widget_after_the_event_title&#039; ); ?&gt;\n    \n            &lt;?php do_action( &#039;tribe_events_list_widget_before_the_meta&#039; ) ?&gt;\n    \n            &lt;div class=&quot;duration&quot;&gt;\n                &lt;h4&gt;&lt;?php echo tribe_events_event_schedule_details(); ?&gt;&lt;\/h4&gt;\n            &lt;\/div&gt;\n            \n        &lt;div class=&quot;event-excerpt&quot;&gt;\n\t\t\t&lt;?php echo tribe_events_get_the_excerpt() ?&gt;\n        &lt;\/div&gt;\n\n            &lt;?php if ( tribe_get_cost() ) : ?&gt;\n\t&lt;div class=&quot;tribe-events-event-cost&quot;&gt;\n\t\tCost: &lt;span class=&quot;ticket-cost&quot;&gt;&lt;?php echo tribe_get_cost( null, true ); ?&gt;&lt;\/span&gt;\n\t\t&lt;?php\n\t\t\/**\n\t\t * Runs after cost is displayed in list style views\n\t\t *\n\t\t * @since 4.5\n\t\t *\/\n\t\tdo_action( &#039;tribe_events_inside_cost&#039; )\n\t\t?&gt;\n\t&lt;\/div&gt;\n&lt;?php endif; ?&gt;\n\t\t\t\n\t\t\t&lt;div class=&quot;grades&quot;&gt;\n                &lt;?php ob_start();\ntribe_get_template_part( &#039;pro\/modules\/meta\/additional-fields&#039;, null, array(\n    &#039;fields&#039; =&gt; tribe_get_custom_fields(),\n) );\n \n$html = ob_get_clean();?&gt;\n                &lt;strong&gt;&lt;?php echo $html; ?&gt;&lt;\/strong&gt;\n            &lt;\/div&gt;\n\n\t\t&lt;?php do_action( &#039;tribe_events_list_widget_after_the_meta&#039; ) ?&gt;\n        &lt;\/div&gt;\n    &lt;\/section&gt;\n&lt;\/div&gt;\n&lt;div class=&quot;hr hr-default  avia-builder-el-10&quot;&gt;&lt;span class=&quot;hr-inner &quot;&gt;&lt;span class=&quot;hr-inner-style&quot;&gt;&lt;\/span&gt;&lt;\/span&gt;&lt;\/div&gt;\n&lt;?php\n\tendwhile;\n} \nwp_reset_query();?&gt;<\/code><\/pre>\n<p>Any thoughts as to why it is not showing up? The events are entered with the correct price and that shows up on the their respective single event page.<\/p>\n","protected":false},"template":"","class_list":["post-1610059","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>Event Cost not displaying -<\/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\/event-cost-not-displaying\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Event Cost not displaying -\" \/>\n<meta property=\"og:description\" content=\"I created a php snippet to display a list of events, but the event cost isn&#8217;t showing up. Here&#8217;s my code: &lt;?php $query = new WP_Query( array( &#039;post_type&#039; =&gt; &#039;tribe_events&#039; , &#039;post_status&#039;=&gt;&#039;publish&#039;, &#039;post_type&#039;=&gt;array(TribeEvents::POSTTYPE), \/\/order by startdate from newest to oldest &#039;meta_key&#039;=&gt;&#039;_EventStartDate&#039;, &#039;orderby&#039;=&gt;&#039;_EventStartDate&#039;, &#039;order&#039;=&gt;&#039;ASC&#039;, &#039;eventDisplay&#039;=&gt;&#039;custom&#039;, &#039;posts_per_page&#039; =&gt; -1 , &#039;tribe_events_cat&#039; =&gt; &#039;fall-winter-spring&#039;, ) ); if ($query-&gt;have_posts()) [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/event-cost-not-displaying\/\" \/>\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=\"3 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\/event-cost-not-displaying\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/event-cost-not-displaying\/\",\"name\":\"Event Cost not displaying -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2018-08-30T19:19:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/event-cost-not-displaying\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/event-cost-not-displaying\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/event-cost-not-displaying\/#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\":\"Eventbrite Tickets\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/eventbrite-tickets\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Event Cost not displaying\"}]},{\"@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":"Event Cost not displaying -","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\/event-cost-not-displaying\/","og_locale":"en_US","og_type":"article","og_title":"Event Cost not displaying -","og_description":"I created a php snippet to display a list of events, but the event cost isn&#8217;t showing up. Here&#8217;s my code: &lt;?php $query = new WP_Query( array( &#039;post_type&#039; =&gt; &#039;tribe_events&#039; , &#039;post_status&#039;=&gt;&#039;publish&#039;, &#039;post_type&#039;=&gt;array(TribeEvents::POSTTYPE), \/\/order by startdate from newest to oldest &#039;meta_key&#039;=&gt;&#039;_EventStartDate&#039;, &#039;orderby&#039;=&gt;&#039;_EventStartDate&#039;, &#039;order&#039;=&gt;&#039;ASC&#039;, &#039;eventDisplay&#039;=&gt;&#039;custom&#039;, &#039;posts_per_page&#039; =&gt; -1 , &#039;tribe_events_cat&#039; =&gt; &#039;fall-winter-spring&#039;, ) ); if ($query-&gt;have_posts()) [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/event-cost-not-displaying\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/event-cost-not-displaying\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/event-cost-not-displaying\/","name":"Event Cost not displaying -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2018-08-30T19:19:33+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/event-cost-not-displaying\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/event-cost-not-displaying\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/event-cost-not-displaying\/#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":"Eventbrite Tickets","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/eventbrite-tickets\/"},{"@type":"ListItem","position":5,"name":"Event Cost not displaying"}]},{"@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\/1610059","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\/1610059\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1610059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}