{"id":1966887,"date":"2025-10-22T05:01:55","date_gmt":"2025-10-22T09:01:55","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/?p=1966887"},"modified":"2026-04-23T13:56:12","modified_gmt":"2026-04-23T17:56:12","slug":"customize-event-cost","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/customize-event-cost\/","title":{"rendered":"Customizing the Event Cost Display"},"content":{"rendered":"\n<p>The Events Calendar and Event Tickets display the cost of your events on the front end in a consistent format. You may want to adjust how that cost appears to better fit your pricing model or your site&#8217;s style. This article collects customizations for the event cost display.<\/p>\n\n\n\n<p>Customizations for The Events Calendar are usually implemented via code snippets or template overrides. Add snippets to your child theme&#8217;s <code>functions.php<\/code> file or use the Code Snippets plugin. Template overrides should go in a child theme. If either approach is new to you, start with <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/best-practices-for-implementing-custom-code-snippets\/\">Using Code Snippets to Customize The Events Calendar<\/a> and <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/customizing-template-files\/\">Customizing The Events Calendar Templates<\/a> for a walkthrough of each.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-renaming-the-free-label\">Renaming the &#8220;Free&#8221; Label<\/h2>\n\n\n\n<p>When an event&#8217;s cost is set to zero, the front end displays it as <strong>Free<\/strong>. You can rename this to any text you prefer \u2014 for example &#8220;Complimentary&#8221;, &#8220;No Charge&#8221;, or a numeric <strong>0<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/theeventscalendar.com\/knowledgebase\/wp-content\/uploads\/2019\/10\/tec-free-to-zero-2.jpg\" alt=\"An event showing 'Free' as the displayed ticket cost\"\/><\/figure>\n\n\n\n<p>There are two ways to do this.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-option-1-php-snippet\">Option 1: PHP Snippet<\/h4>\n\n\n\n<p>Add the following to your <code>functions.php<\/code> file. Change <code>'0'<\/code> to whatever you want the label to say \u2014 it is case-sensitive.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction tribe_tec_rename_free_label( $translation, $text, $domain ) {\n    $custom_text = &#x5B; &#039;Free&#039; =&gt; &#039;0&#039; ]; \/\/ Replace &#039;0&#039; with your preferred label\n\n    if ( 0 === strpos( $domain, &#039;the-events-calendar&#039; ) &amp;amp;&amp;amp; array_key_exists( $translation, $custom_text ) ) {\n        $translation = $custom_text&#x5B; $translation ];\n    }\n\n    return $translation;\n}\nadd_filter( &#039;gettext&#039;, &#039;tribe_tec_rename_free_label&#039;, 20, 3 );\n<\/pre><\/div>\n\n\n<p>\ud83d\udc4b <strong>Note:<\/strong> This uses the <code>gettext<\/code> filter and applies to The Events Calendar plugin&#8217;s text domain. If you are using Event Tickets or Event Tickets Plus and the label is still showing after applying this snippet, the <code>tribe_get_cost<\/code> approach in the next section may be needed instead.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-option-2-the-say-what-plugin\">Option 2: The Say What? Plugin<\/h4>\n\n\n\n<p>The <a href=\"https:\/\/wordpress.org\/plugins\/say-what\/\">Say What?<\/a> plugin provides a user interface for WordPress string replacements without writing code, and does the same thing as the snippet above.<\/p>\n\n\n\n<p>After installing and activating the plugin, go to <strong>Tools \u2192 Text Changes<\/strong> and add a new entry:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/theeventscalendar.com\/knowledgebase\/wp-content\/uploads\/2019\/10\/tec-free-to-zero-say-what.jpg\" alt=\"The Say What? plugin interface showing a text replacement entry for 'Free'\"\/><\/figure>\n\n\n\n<p>Click <strong>Save<\/strong> and the label will update on the front end.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-removing-free-from-a-mixed-cost-range\">Removing &#8220;Free&#8221; from a Mixed Cost Range<\/h2>\n\n\n\n<p>If your event has both free tickets (or RSVPs) and paid tickets, the cost display defaults to a range \u2014 for example, <strong>Free \u2013 $10<\/strong>. If you would rather not show &#8220;Free&#8221; in this range at all, the following snippet removes it along with the dash separator, leaving only the paid price.<\/p>\n\n\n\n<p>This uses the <code>tribe_get_cost<\/code> filter, which works with Event Tickets and Event Tickets Plus.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction tribe_not_show_free( $cost, $post_id, $with_currency_symbol ) {\n    $regex = &#039;\/Free\/&#039;;\n    $match = preg_match( $regex, $cost );\n\n    if ( $cost == 0 || $cost == &#039;Free&#039; || $match ) {\n        $cost = str_replace( &#039;Free&#039;, &#039; &#039;, $cost );\n        $cost = str_replace( &#039; \u2013 &#039;, &#039; &#039;, $cost );\n    }\n\n    return $cost;\n}\nadd_filter( &#039;tribe_get_cost&#039;, &#039;tribe_not_show_free&#039;, 10, 3 );\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-showing-only-one-end-of-a-price-range\">Showing Only One End of a Price Range<\/h2>\n\n\n\n<p>When multiple tickets exist for an event, the cost displays as a range (e.g. <strong>$5 \u2013 $50<\/strong>). This can be confusing in cases like early bird pricing, where the lower price is no longer available. The following snippet lets you replace the range with either the lowest price (with optional prefixed text) or the highest price only.<\/p>\n\n\n\n<p>Add the snippet to your <code>functions.php<\/code> file or via Code Snippets. Before saving, delete the block you <em>do not<\/em> want \u2014 either the lowest-price block or the highest-price block.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction tec_remove_price_range( $cost, $post_id, $with_currency_symbol ) {\n    $pieces = explode( &#039; \u2013 &#039;, $cost );\n\n    \/\/ If the ticket is free, just display it as-is.\n    if ( $cost == &#039;Free&#039; ) {\n        return $cost;\n    }\n\n    \/\/ DELETE the block below if you want to show only the highest price instead.\n    \/\/ To show the lowest price with prefix text:\n    if ( ! empty( $pieces&#x5B;0] ) ) {\n        return &#039;Starting from &#039; . $pieces&#x5B;0];\n    }\n\n    \/\/ DELETE the block above if you want to show only the lowest price.\n    \/\/ To show the highest price with prefix text:\n    if ( ! empty( $pieces&#x5B;1] ) ) {\n        return &#039;Up to &#039; . $pieces&#x5B;1];\n    }\n\n    \/\/ If not a range, return the default value.\n    return $cost;\n}\nadd_filter( &#039;tribe_get_cost&#039;, &#039;tec_remove_price_range&#039;, 10, 3 );\n<\/pre><\/div>\n\n\n<p>Showing the lowest price with &#8220;Starting from&#8221; prefix:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/Starting.jpg\" alt=\"Event cost showing 'Starting from $5' instead of a full price range\"\/><\/figure>\n\n\n\n<p>Showing only the highest price with &#8220;Up to&#8221; prefix (remove lines 9\u201312 from the snippet above):<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/Up-to-Price-1.png\" alt=\"Event cost showing 'Up to $50' instead of a full price range\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-separating-the-event-cost-and-the-currency-symbol\">Separating the Event Cost and the Currency Symbol<\/h2>\n\n\n\n<p>With&nbsp;<strong>The Events Calendar<\/strong>, you can easily&nbsp;<a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/k\/creating-an-event\/#Event_Cost\">set a cost for events<\/a>, define the currency symbol, and decide whether the symbol appears before or after the cost. While this setup works well for common symbols like&nbsp;<code>$<\/code>&nbsp;or&nbsp;<code>\u20ac<\/code>, issues can arise if you prefer using currency abbreviations, such as \u201cEUR\u201d or \u201cUSD\u201d since the cost and abbreviation will display without a space (e.g.,&nbsp;<code>100EUR<\/code>).<\/p>\n\n\n\n<p>Thankfully, there are easy ways to fix this formatting issue.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-option-1-add-a-space-manually\"><strong>Option 1: Add a Space Manually<\/strong><\/h4>\n\n\n\n<p>To insert a space between the cost and the currency abbreviation:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Enter the currency abbreviation with a space in the appropriate field.<br>For example:\n<ul class=\"wp-block-list\">\n<li>Use&nbsp;<code>_EUR<\/code>&nbsp;or&nbsp;<code>EUR_<\/code>&nbsp;(underscore added here for clarity; replace it with a space).<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>This method ensures that your cost will display as&nbsp;<code>100 EUR<\/code>&nbsp;instead of&nbsp;<code>100EUR<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2022\/03\/Screen-Shot-2022-03-16-at-11.24.07-AM-2.png\" alt=\"Event Cost field in the Classic Editor\" class=\"wp-image-1952321\"\/><figcaption class=\"wp-element-caption\">Event Cost field in the Classic Editor<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2022\/03\/Screen-Shot-2022-03-16-at-11.22.18-AM-1.png\" alt=\"Event Cost field in the Block Editor\" class=\"wp-image-1952313\"\/><figcaption class=\"wp-element-caption\">Event Cost field in the Block Editor<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-option-2-adjust-settings-for-currency-symbols\"><strong>Option 2: Adjust Settings for Currency Symbols<\/strong><\/h4>\n\n\n\n<p>If you want to define a default currency symbol or code, follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Navigate to&nbsp;<strong>Events &gt; Settings &gt; Display<\/strong>&nbsp;in your WordPress dashboard.<\/li>\n\n\n\n<li>Locate the&nbsp;<strong>Currency Settings<\/strong>&nbsp;section.<\/li>\n\n\n\n<li>Add your desired currency symbol or abbreviation here.<\/li>\n<\/ol>\n\n\n\n<p>You can also define whether the symbol should appear&nbsp;<strong>before or after<\/strong>&nbsp;the cost.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2022\/03\/Screen-Shot-2022-03-16-at-11.20.42-AM.png\" alt=\"Currency options under Events Settings &gt; General.\" class=\"wp-image-1952323\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-option-3-use-code-snippets-for-greater-control\"><strong>Option 3: Use Code Snippets for Greater Control<\/strong><\/h4>\n\n\n\n<p>For more advanced customization, you can use snippets to control the placement and format of the currency symbol or code. Add the appropriate snippet to a custom plugin or your child theme\u2019s&nbsp;<code>functions.php<\/code>&nbsp;file. For more advanced customization, you can use snippets to control the placement and format of the currency symbol or code. Add the appropriate snippet to a custom plugin or your child theme\u2019s&nbsp;<code>functions.php<\/code>&nbsp;file.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"h-if-the-currency-symbol-like-is-before-the-cost\"><strong>If the currency symbol (like \u20ac) is before the cost:<\/strong><\/h5>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n\/\/ Add a space before the Euro symboladd_filter( &#039;tribe_get_cost&#039;, &#039;add_space_before_euro&#039;);functionadd_space_before_euro( $cost) {\u00a0\u00a0\u00a0\u00a0if( is_admin() ) {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return$cost;\u00a0\u00a0\u00a0\u00a0}\u00a0\u00a0\u00a0\u00a0$cost= str_replace( &#039;\u20ac&#039;, &#039; \u20ac&#039;, $cost);\u00a0\u00a0\u00a0\u00a0$cost= str_replace( &#039;&amp;euro;&#039;, &#039; &amp;euro;&#039;, $cost);\u00a0\u00a0\u00a0\u00a0$cost= str_replace( &#039;&amp;#8364;&#039;, &#039; &amp;#8364;&#039;, $cost);\u00a0\u00a0\u00a0\u00a0return$cost;}\n<\/pre><\/div>\n\n\n<h5 class=\"wp-block-heading\" id=\"h-if-the-currency-symbol-is-after-the-cost\"><strong>If the currency symbol is after the cost:<\/strong><\/h5>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tribe_get_cost&#039;, &#039;add_space_before_dollar&#039;);functionadd_space_before_dollar( $cost) {\u00a0\u00a0\u00a0\u00a0if( is_admin() ) {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return$cost;\u00a0\u00a0\u00a0\u00a0}\u00a0\u00a0\u00a0\u00a0$cost= str_replace( &#039;$&#039;, &#039; $&#039;, $cost);\u00a0\u00a0\u00a0\u00a0$cost= str_replace( &#039;&amp;#36;&#039;, &#039; &amp;#36;&#039;, $cost);\u00a0\u00a0\u00a0\u00a0return$cost;}\n<\/pre><\/div>\n\n\n<p>By using one of these methods, you can ensure that your event cost formatting looks clean and professional, whether you\u2019re using symbols or abbreviations. Choose the approach that works best for your setup and design preferences.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-disclaimer\">Disclaimer<\/h2>\n\n\n\n<p>As with all of our snippets, please note that we share these in the hope they will be useful <strong>but without any guarantees or commitments<\/strong>. If you wish to use them, it is your responsibility to test them and adapt them to your needs (or find someone who can do so on your behalf). We are unable to provide further support in relation to these snippets.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Events Calendar and Event Tickets display the cost of your events on the front end in a consistent format. You may want to adjust how that cost appears to better fit your pricing model or your site&#8217;s style. This article collects customizations for the event cost display. Renaming the &#8220;Free&#8221; Label When an event&#8217;s&#8230;<\/p>\n","protected":false},"author":63,"featured_media":1955565,"comment_status":"open","ping_status":"open","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":[24,59],"tags":[],"stellar-product-taxonomy":[161],"class_list":["post-1966887","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing","category-php","stellar-product-taxonomy-the-events-calendar"],"acf":[],"taxonomy_info":{"category":[{"value":24,"label":"Customizing"},{"value":59,"label":"PHP"}],"stellar-product-taxonomy":[{"value":161,"label":"The Events Calendar"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Tristan","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/tristan\/"},"comment_info":0,"category_info":[{"term_id":24,"name":"Customizing","slug":"customizing","term_group":0,"term_taxonomy_id":24,"taxonomy":"category","description":"","parent":0,"count":67,"filter":"raw","term_order":"0","cat_ID":24,"category_count":67,"category_description":"","cat_name":"Customizing","category_nicename":"customizing","category_parent":0},{"term_id":59,"name":"PHP","slug":"php","term_group":0,"term_taxonomy_id":59,"taxonomy":"category","description":"","parent":24,"count":52,"filter":"raw","term_order":"0","cat_ID":59,"category_count":52,"category_description":"","cat_name":"PHP","category_nicename":"php","category_parent":24}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1966887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1966887"}],"version-history":[{"count":8,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1966887\/revisions"}],"predecessor-version":[{"id":1970081,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1966887\/revisions\/1970081"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1966887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1966887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1966887"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1966887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}