{"id":1896729,"date":"2019-10-18T13:19:59","date_gmt":"2019-10-18T17:19:59","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/changing-the-free-event-price-to-0-zero\/"},"modified":"2020-03-03T07:07:52","modified_gmt":"2020-03-03T12:07:52","slug":"changing-the-free-event-price-to-0-zero","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/changing-the-free-event-price-to-0-zero\/","title":{"rendered":"Change &#8220;Free&#8221; to &#8220;0&#8221; in the Ticket Cost"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Description<\/h3>\n\n\n\n<p>When you enter a price or a price range for an event and it is or starts with zero (0), then on the front-end it will show up as &#8216;Free&#8217;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/knowledgebase\/wp-content\/uploads\/2019\/10\/tec-free-to-zero-2.jpg\" alt=\"\" class=\"wp-image-1944204\"\/><\/figure>\n\n\n\n<p>If you would rather like to see the number zero instead of &#8216;Free&#8217;, there are two easy ways to do that.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Option 1: A snippet<\/h2>\n\n\n\n<p>Copy the below code into your (child) theme&#8217;s <code>functions.php<\/code> file (or wherever you usually put custom code).<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nfunction tribe_tec_change_free_to_zero ( $translation, $text, $domain ) {\n\n  $custom_text = &#x5B; &#039;Free&#039; =&gt; &#039;0&#039; ];\n\n  \/\/ If this text domain starts with &quot;tribe-&quot;, &quot;the-events-&quot;, or &quot;event-&quot; and we have replacement text\n  if( 0 === strpos($domain, &#039;the-events-calendar&#039;) &amp;&amp; array_key_exists( $translation, $custom_text ) ) {\n    $translation = $custom_text&#x5B;$translation];\n  }\n  return $translation;\n}\nadd_filter( &#039;gettext&#039;, &#039;tribe_tec_change_free_to_zero&#039;, 20, 3 );\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Option 2: The &#8216;Say What?&#8217; plugin<\/h3>\n\n\n\n<p>The <a href=\"https:\/\/wordpress.org\/plugins\/say-what\/\" target=\"_blank\" rel=\"noopener noreferrer\">Say What?<\/a> plugin actually does what the above snippet, but it gives you a nice user interface.<\/p>\n\n\n\n<p>After installing and activating the plugin go to Tools \u2192&nbsp;Text Changes and add a new entry like in this screenshot:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/knowledgebase\/wp-content\/uploads\/2019\/10\/tec-free-to-zero-say-what.jpg\" alt=\"\" class=\"wp-image-1944205\"\/><\/figure>\n\n\n\n<p>Click &#8220;Save&#8221; and you&#8217;re set.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Plugins<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>The Events Calendar<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Notes<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Originally written in May 2019<\/li><li>Tested with The Events Calendar 4.9.2<\/li><li>Author: Andr\u00e1s Guseo<\/li><li>This is for The Events Calendar plugin. If you need a solution for RSVPs \/ tickets with Event Tickets or Event Tickets Plus, then this article might be helpful.<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Description When you enter a price or a price range for an event and it is or starts with zero (0), then on the front-end it will show up as &#8216;Free&#8217; If you would rather like to see the number zero instead of &#8216;Free&#8217;, there are two easy ways to do that. Option 1: A&#8230;<\/p>\n","protected":false},"author":7,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[79],"tags":[58],"stellar-product-taxonomy":[155,156],"class_list":["post-1896729","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippets","tag-php","stellar-product-taxonomy-event-tickets","stellar-product-taxonomy-event-tickets-plus"],"acf":[],"taxonomy_info":{"category":[{"value":79,"label":"Snippets"}],"post_tag":[{"value":58,"label":"PHP"}],"stellar-product-taxonomy":[{"value":155,"label":"Event Tickets"},{"value":156,"label":"Event Tickets Plus"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Stephen Page","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/stephen\/"},"comment_info":0,"category_info":[{"term_id":79,"name":"Snippets","slug":"snippets","term_group":0,"term_taxonomy_id":79,"taxonomy":"category","description":"","parent":0,"count":136,"filter":"raw","term_order":"0","cat_ID":79,"category_count":136,"category_description":"","cat_name":"Snippets","category_nicename":"snippets","category_parent":0}],"tag_info":[{"term_id":58,"name":"PHP","slug":"php","term_group":0,"term_taxonomy_id":58,"taxonomy":"post_tag","description":"","parent":20,"count":128,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1896729"}],"version-history":[{"count":1,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896729\/revisions"}],"predecessor-version":[{"id":1956101,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896729\/revisions\/1956101"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1896729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1896729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1896729"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1896729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}