{"id":1133386,"date":"2016-06-29T07:06:28","date_gmt":"2016-06-29T14:06:28","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/search-message-no-results-found-for-xxx-needs-to-be-changed\/"},"modified":"2016-06-29T07:06:28","modified_gmt":"2016-06-29T14:06:28","slug":"search-message-no-results-found-for-xxx-needs-to-be-changed","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/search-message-no-results-found-for-xxx-needs-to-be-changed\/","title":{"rendered":"Search Message &quot;No results Found for XXX&quot; needs to be changed"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I have found several threads asking to replace the search term when it says &#8220;There were no results found&#8221;. This is all well and good but the latest version has the search term written after this. I want the text to be replaced with something. I&#8217;ve written the function I&#8217;ve got below, I just need to know how to identify the string to replace as it involves a variable.<\/p>\n<p>If you want to see the string I want to change, go to this link &#8211; http:\/\/ssstsuk.co.uk\/courses\/?tribe_paged=1&amp;tribe_event_display=list&amp;tribe-bar-search=test<\/p>\n<p>Code I&#8217;ve got is below&#8230;<\/p>\n<p><code>add_filter( 'tribe_events_the_notices', 'customize_notice', 10, 2 );<\/p>\n<p>function customize_notice( $html, $notices ) {<\/p>\n<p>        \/\/ If text is found in notice, then replace it<br \/>\n        if( stristr( $html, 'There were no results found.' ) ) {<br \/>\n                 \/\/ Customize the message as needed<br \/>\n                 $searchchange = str_replace( 'There were no results found.', 'Your custom notice goes here.', $searchchange );<br \/>\n        }<\/p>\n<p>        return $searchchange;<\/p>\n<p>}<\/code><\/p>\n<p>Obviously the variable needs to be added in the first bit. Any help greatly appreciated.<\/p>\n","protected":false},"template":"","class_list":["post-1133386","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>Search Message &quot;No results Found for XXX&quot; needs to be changed -<\/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\/search-message-no-results-found-for-xxx-needs-to-be-changed\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Search Message &quot;No results Found for XXX&quot; needs to be changed -\" \/>\n<meta property=\"og:description\" content=\"Hi, I have found several threads asking to replace the search term when it says &#8220;There were no results found&#8221;. This is all well and good but the latest version has the search term written after this. I want the text to be replaced with something. I&#8217;ve written the function I&#8217;ve got below, I just [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/search-message-no-results-found-for-xxx-needs-to-be-changed\/\" \/>\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\/search-message-no-results-found-for-xxx-needs-to-be-changed\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/search-message-no-results-found-for-xxx-needs-to-be-changed\/\",\"name\":\"Search Message &quot;No results Found for XXX&quot; needs to be changed -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-06-29T14:06:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/search-message-no-results-found-for-xxx-needs-to-be-changed\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/search-message-no-results-found-for-xxx-needs-to-be-changed\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/search-message-no-results-found-for-xxx-needs-to-be-changed\/#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\":\"Event Tickets Plus\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Search Message &quot;No results Found for XXX&quot; needs to be changed\"}]},{\"@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":"Search Message &quot;No results Found for XXX&quot; needs to be changed -","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\/search-message-no-results-found-for-xxx-needs-to-be-changed\/","og_locale":"en_US","og_type":"article","og_title":"Search Message &quot;No results Found for XXX&quot; needs to be changed -","og_description":"Hi, I have found several threads asking to replace the search term when it says &#8220;There were no results found&#8221;. This is all well and good but the latest version has the search term written after this. I want the text to be replaced with something. I&#8217;ve written the function I&#8217;ve got below, I just [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/search-message-no-results-found-for-xxx-needs-to-be-changed\/","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\/search-message-no-results-found-for-xxx-needs-to-be-changed\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/search-message-no-results-found-for-xxx-needs-to-be-changed\/","name":"Search Message &quot;No results Found for XXX&quot; needs to be changed -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-06-29T14:06:28+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/search-message-no-results-found-for-xxx-needs-to-be-changed\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/search-message-no-results-found-for-xxx-needs-to-be-changed\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/search-message-no-results-found-for-xxx-needs-to-be-changed\/#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":"Event Tickets Plus","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/"},{"@type":"ListItem","position":5,"name":"Search Message &quot;No results Found for XXX&quot; needs to be changed"}]},{"@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\/1133386","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\/1133386\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1133386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}