{"id":1896544,"date":"2019-10-18T13:19:25","date_gmt":"2019-10-18T17:19:25","guid":{"rendered":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/changing-meta-field-labels-2\/"},"modified":"2025-05-11T00:47:57","modified_gmt":"2025-05-11T04:47:57","slug":"changing-meta-field-labels","status":"publish","type":"post","link":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/changing-meta-field-labels\/","title":{"rendered":"Custom Labels for Event Details"},"content":{"rendered":"\n<p>In this post we&#8217;re going to look at modifying the names of various labels in the single event meta area. This is the section of the page that typically sits below the event description and lists things such as time, cost, any tags or categories and other information (such as details of the venue or organizer).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2015\/03\/single-event-meta-details-area.png\" alt=\"Screenshot showing the single event meta area\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><\/p>\n\n\n\n<p>While the default labels work well in most cases, changing them can help you to craft a more intuitive experience for your visitors. In this post we&#8217;ll pick on two different fields, each of which require a slightly different approach:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, we&#8217;ll change the <strong>Website<\/strong> label <strong>to To learn more, visit<\/strong><\/li>\n\n\n\n<li>Second, we&#8217;ll change <strong>Event Categories<\/strong> to <strong>Find similar events<\/strong><\/li>\n\n\n\n<li>Then, we&#8217;ll change <strong>Event Tags<\/strong> to <strong>Find events with specific details<\/strong><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"regular\">Website label<\/h2>\n\n\n\n<p>Our first task is to set up a template override for the <code>the-events-calendar\/src\/views\/modules\/meta\/details.php<\/code> template \u2014 details on this process are described in full within the <a href=\"https:\/\/dev.theeventscalendar.com\/knowledgebase\/guide\/customization\/\" target=\"_blank\" rel=\"noopener noreferrer\">Customizing The Events Calendar<\/a> article\u2014then, within your custom copy, locate the following line:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u00a0$website_title = tribe_events_get_event_website_title();<\/pre>\n\n\n\n<p><code>$website_title<\/code> is the variable that holds the Website label, which then gets displayed in the later part of the code. So, we&#8217;ll change this to the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$website_title = \"To learn more, visit:\";<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"category\">Category label<\/h2>\n\n\n\n<p>Within the same template, look for the following chunk of code:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>echo tribe_get_event_categories(<br>\tget_the_id(),<br>\t[<br>\t\t'before'       => '',<br>\t\t'sep'          => ', ',<br>\t\t'after'        => '',<br>\t\t'label'        => null, \/\/ An appropriate plural\/singular label will be provided<br>\t\t'label_before' => '&lt;dt class=\"tribe-events-event-categories-label\">',<br>\t\t'label_after'  => '&lt;\/dt>',<br>\t\t'wrap_before'  => '&lt;dd class=\"tribe-events-event-categories\">',<br>\t\t'wrap_after'   => '&lt;\/dd>',<br>\t]<br>);<br>?><\/pre>\n\n\n\n<p>This displays the list of categories\u2014but where is the label? It&#8217;s actually this single line found within the above chunk of code<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">'label'        => null, \/\/ An appropriate plural\/singular label will be provided<\/pre>\n\n\n\n<p>This simply tells The Events Calendar to use a default label (which magically changes depending on where there is just one category or several categories). To specify our own label, though, all we need to do is change that line to:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">'label'        => '<code>Find similar events:',<\/code><\/pre>\n\n\n\n<p>Be sure to keep the final comma in place! With those changes in place, we should now see:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2015\/03\/modified-section-of-event-meta.png\" alt=\"Screenshot showing customized meta labels\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"category\">Event Tags label<\/h2>\n\n\n\n<p>Within the same template, look for the following chunk of code:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>tribe_meta_event_archive_tags(<br>\t\/* Translators: %s: Event (singular) *\/<br>\tsprintf(<br>\t\tesc_html__( '%s Tags:', 'the-events-calendar' ),<br>\t\ttribe_get_event_label_singular()<br>\t),<br>\t', ',<br>\ttrue<br>);<br>?><\/pre>\n\n\n\n<p>This displays the list of event tags\u2014but where is the label? It&#8217;s actually the following lines found within the above chunk of code<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/* Translators: %s: Event (singular) *\/<br>sprintf(<br>\t\tesc_html__( '%s Tags:', 'the-events-calendar' ),<br>\t\ttribe_get_event_label_singular()<br>\t),<\/pre>\n\n\n\n<p>So, to specify our own label, we need to change that piece of code to:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">'Find events with specific details:<code>',<\/code><\/pre>\n\n\n\n<p>Be sure to keep the comma in place. So, the entire chunk of code should now look like the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>tribe_meta_event_archive_tags(<br>\t'Find events with specific details:',<br>\t', ',<br>\ttrue<br>);<br>?><\/pre>\n\n\n\n<p>We hope that gives some insights into customizing the single event meta fields!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post we&#8217;re going to look at modifying the names of various labels in the single event meta area. This is the section of the page that typically sits below the event description and lists things such as time, cost, any tags or categories and other information (such as details of the venue or&#8230;<\/p>\n","protected":false},"author":2,"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":[115,30,58],"stellar-product-taxonomy":[158],"class_list":["post-1896544","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippets","tag-classic-editor","tag-event-metadata","tag-php","stellar-product-taxonomy-events-calendar-pro"],"acf":[],"taxonomy_info":{"category":[{"value":79,"label":"Snippets"}],"post_tag":[{"value":115,"label":"Classic editor"},{"value":30,"label":"Event Metadata"},{"value":58,"label":"PHP"}],"stellar-product-taxonomy":[{"value":158,"label":"Events Calendar Pro"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"zach","author_link":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/author\/zach\/"},"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":115,"name":"Classic editor","slug":"classic-editor","term_group":0,"term_taxonomy_id":115,"taxonomy":"post_tag","description":"","parent":27,"count":18,"filter":"raw","term_order":"0"},{"term_id":30,"name":"Event Metadata","slug":"event-metadata","term_group":0,"term_taxonomy_id":30,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw","term_order":"0"},{"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:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896544","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1896544"}],"version-history":[{"count":6,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896544\/revisions"}],"predecessor-version":[{"id":1965218,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896544\/revisions\/1965218"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1896544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1896544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1896544"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/dev.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1896544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}