{"id":935117,"date":"2015-01-20T04:36:55","date_gmt":"2015-01-20T12:36:55","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-events-randomly-gone-back-to-default\/"},"modified":"2015-01-21T20:22:08","modified_gmt":"2015-01-22T04:22:08","slug":"title-events-randomly-gone-back-to-default","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-events-randomly-gone-back-to-default\/","title":{"rendered":"Title &quot;Events&quot; randomly gone back to default"},"content":{"rendered":"<p>Hello,<\/p>\n<p>The other week I changed the title of &#8220;events&#8221; to &#8220;courses&#8221; using the following code:<\/p>\n<p>\/\/ This example replaces &#8220;Event&#8221; with &#8220;Course&#8221; in all Tribe Plugins text<\/p>\n<p>\/\/ See the codex to learn more about WP text domains:<br \/>\n\/\/ http:\/\/codex.wordpress.org\/Translating_WordPress#Localization_Technology<br \/>\n\/\/ Example Tribe domains: &#8216;tribe-events-calendar&#8217;, &#8216;tribe-events-calendar-pro&#8217;&#8230;<\/p>\n<p>add_filter(&#8216;gettext&#8217;, &#8216;theme_filter_text&#8217;, 10, 3);<\/p>\n<p>function theme_filter_text( $translations, $text, $domain ) {<br \/>\n \/\/ If this text domain starts with &#8220;tribe-&#8221;<br \/>\n if(strpos($domain, &#8216;tribe-&#8216;) === 0) {<br \/>\n \/\/ Replace upper case, lower case, singular, and plural<br \/>\n $text = str_replace(<br \/>\n \/\/ Text to search for<br \/>\n array(&#8216;Event&#8217;, &#8216;event&#8217;, &#8216;Events&#8217;, &#8216;events&#8217;),<\/p>\n<p> \/\/ Text to replace it with &#8212; change this for your needs<br \/>\n array(&#8216;Course&#8217;, &#8216;course&#8217;, &#8216;Courses&#8217;, &#8216;courses&#8217;),<br \/>\n $text<br \/>\n );<\/p>\n<p> }<\/p>\n<p> return $text;<br \/>\n}<\/p>\n<p>add_filter(&#8216;ngettext&#8217;, &#8216;theme_filter_ntext&#8217;, 10, 5);<\/p>\n<p>function theme_filter_ntext( $translation, $single, $plural, $number, $domain ) {<br \/>\n \/\/ If this text domain starts with &#8220;tribe-&#8221;<br \/>\n if(strpos($domain, &#8216;tribe-&#8216;) === 0) {<br \/>\n \/\/ Replace upper case, lower case, singular, and plural<br \/>\n if( $number &gt; 1 ) {<br \/>\n $plural = str_replace(<br \/>\n \/\/ Text to search for<br \/>\n array(&#8216;Events&#8217;, &#8216;events&#8217;),<\/p>\n<p> \/\/ Text to replace it with &#8212; change this for your needs<br \/>\n array(&#8216;Courses&#8217;, &#8216;courses&#8217;),<br \/>\n $plural<br \/>\n );<\/p>\n<p> return $plural;<br \/>\n } else {<br \/>\n $single = str_replace(<br \/>\n \/\/ Text to search for<br \/>\n array(&#8216;Event&#8217;, &#8216;event&#8217;),<\/p>\n<p> \/\/ Text to replace it with &#8212; change this for your needs<br \/>\n array(&#8216;Course&#8217;, &#8216;course&#8217;),<br \/>\n $single<br \/>\n );<\/p>\n<p> return $single;<br \/>\n }<br \/>\n }<br \/>\n}<\/p>\n<p>Everything went fine until I logged in yesterday and it had mysteriously gone back to &#8220;event&#8221;. Do you know why this is? <\/p>\n<p>Thanks<\/p>\n","protected":false},"template":"","class_list":["post-935117","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>Title &quot;Events&quot; randomly gone back to default  -<\/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\/title-events-randomly-gone-back-to-default\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Title &quot;Events&quot; randomly gone back to default  -\" \/>\n<meta property=\"og:description\" content=\"Hello, The other week I changed the title of &#8220;events&#8221; to &#8220;courses&#8221; using the following code: \/\/ This example replaces &#8220;Event&#8221; with &#8220;Course&#8221; in all Tribe Plugins text \/\/ See the codex to learn more about WP text domains: \/\/ http:\/\/codex.wordpress.org\/Translating_WordPress#Localization_Technology \/\/ Example Tribe domains: &#8216;tribe-events-calendar&#8217;, &#8216;tribe-events-calendar-pro&#8217;&#8230; add_filter(&#8216;gettext&#8217;, &#8216;theme_filter_text&#8217;, 10, 3); function theme_filter_text( $translations, $text, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-events-randomly-gone-back-to-default\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-01-22T04:22:08+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\/title-events-randomly-gone-back-to-default\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-events-randomly-gone-back-to-default\/\",\"name\":\"Title &quot;Events&quot; randomly gone back to default -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-01-20T12:36:55+00:00\",\"dateModified\":\"2015-01-22T04:22:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-events-randomly-gone-back-to-default\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-events-randomly-gone-back-to-default\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-events-randomly-gone-back-to-default\/#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\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Title &quot;Events&quot; randomly gone back to default\"}]},{\"@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":"Title &quot;Events&quot; randomly gone back to default  -","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\/title-events-randomly-gone-back-to-default\/","og_locale":"en_US","og_type":"article","og_title":"Title &quot;Events&quot; randomly gone back to default  -","og_description":"Hello, The other week I changed the title of &#8220;events&#8221; to &#8220;courses&#8221; using the following code: \/\/ This example replaces &#8220;Event&#8221; with &#8220;Course&#8221; in all Tribe Plugins text \/\/ See the codex to learn more about WP text domains: \/\/ http:\/\/codex.wordpress.org\/Translating_WordPress#Localization_Technology \/\/ Example Tribe domains: &#8216;tribe-events-calendar&#8217;, &#8216;tribe-events-calendar-pro&#8217;&#8230; add_filter(&#8216;gettext&#8217;, &#8216;theme_filter_text&#8217;, 10, 3); function theme_filter_text( $translations, $text, [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-events-randomly-gone-back-to-default\/","article_modified_time":"2015-01-22T04:22:08+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\/title-events-randomly-gone-back-to-default\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-events-randomly-gone-back-to-default\/","name":"Title &quot;Events&quot; randomly gone back to default -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-01-20T12:36:55+00:00","dateModified":"2015-01-22T04:22:08+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-events-randomly-gone-back-to-default\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-events-randomly-gone-back-to-default\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-events-randomly-gone-back-to-default\/#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":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Title &quot;Events&quot; randomly gone back to default"}]},{"@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\/935117","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":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/935117\/revisions"}],"predecessor-version":[{"id":935222,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/935117\/revisions\/935222"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=935117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}