{"id":231291,"date":"2014-06-17T07:02:54","date_gmt":"2014-06-17T14:02:54","guid":{"rendered":"https:\/\/tri.be\/support\/forums\/topic\/display-category-titles-instead-of-upcoming-events\/"},"modified":"2014-06-20T05:27:45","modified_gmt":"2014-06-20T12:27:45","slug":"display-category-titles-instead-of-upcoming-events","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/display-category-titles-instead-of-upcoming-events\/","title":{"rendered":"Display Category Titles instead of Upcoming Events"},"content":{"rendered":"<p>Hi there,<\/p>\n<p>I want to display category titles in photo view and *only* display category titles (i.e. not the &#8216;Upcoming Event &gt;&#8217; bit at the beginning).<\/p>\n<p>As explained in <a href=\"https:\/\/tri.be\/support\/forums\/topic\/title-page-on-photo-mode\/\">this thread<\/a>, for some reason in photo view category titles are not displayed at all, so I used the code in <a href=\"https:\/\/tri.be\/support\/forums\/topic\/title-page-on-photo-mode\/#post-141454\">this post<\/a> to fix that:<\/p>\n<pre><code>\nadd_action( &#039;tribe_pre_get_view&#039;, &#039;occassionally_kill_pro_title_filter&#039; );\nfunction occassionally_kill_pro_title_filter() {\n\tremove_action( &#039;tribe_pre_get_view&#039;, &#039;occassionally_kill_pro_title_filter&#039; );\n\tif ( ! tribe_is_photo() ) return; \/\/ You could extend or further limit when this runs\n\tremove_filter( &#039;tribe_get_events_title&#039;, array( TribeEventsPro::instance(), &#039;reset_page_title&#039;));\n}\n<\/code><\/pre>\n<p>However, as previously mentioned, I also want to remove the &#8216;Upcoming Events &gt;&#8217; bit at the beginning.<\/p>\n<p>In an attempt to do this I followed the instructions <a href=\"https:\/\/tri.be\/support\/forums\/topic\/change-upcoming-events-title\/#post-168823\">here<\/a> and added this code to my functions.php<\/p>\n<pre><code>\nadd_filter(&#039;gettext&#039;, &#039;theme_filter_text&#039;, 10, 3);\nfunction theme_filter_text( $translations, $text, $domain ) {\n\/\/ Copy and modify the following if {} statement to replace multiple blocks of text\n\/\/ Match the text you want you want to translate, preferably also match the text domain\nif( $domain === &#039;tribe-events-calendar&#039; ) {\n\/\/ The custom text you want instead\n$text = str_ireplace( &quot;Upcoming Events&quot;, &quot;What&#039;s On&quot;, $text );\n}\nreturn $text;\n}\n<\/code><\/pre>\n<p>That kinda sorta works, but I&#8217;m still left with &gt; displaying before the category and I&#8217;m guessing there is a much better and more elegant way to achieve what I&#8217;m trying to achieve? Thanks in advance for sharing the code needed to do it! \ud83d\ude42<\/p>\n","protected":false},"template":"","class_list":["post-231291","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>Display Category Titles instead of Upcoming Events -<\/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\/display-category-titles-instead-of-upcoming-events\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Display Category Titles instead of Upcoming Events -\" \/>\n<meta property=\"og:description\" content=\"Hi there, I want to display category titles in photo view and *only* display category titles (i.e. not the &#8216;Upcoming Event &gt;&#8217; bit at the beginning). As explained in this thread, for some reason in photo view category titles are not displayed at all, so I used the code in this post to fix that: [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/display-category-titles-instead-of-upcoming-events\/\" \/>\n<meta property=\"article:modified_time\" content=\"2014-06-20T12:27:45+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\/display-category-titles-instead-of-upcoming-events\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/display-category-titles-instead-of-upcoming-events\/\",\"name\":\"Display Category Titles instead of Upcoming Events -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2014-06-17T14:02:54+00:00\",\"dateModified\":\"2014-06-20T12:27:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/display-category-titles-instead-of-upcoming-events\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/display-category-titles-instead-of-upcoming-events\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/display-category-titles-instead-of-upcoming-events\/#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\":\"Display Category Titles instead of Upcoming Events\"}]},{\"@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":"Display Category Titles instead of Upcoming Events -","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\/display-category-titles-instead-of-upcoming-events\/","og_locale":"en_US","og_type":"article","og_title":"Display Category Titles instead of Upcoming Events -","og_description":"Hi there, I want to display category titles in photo view and *only* display category titles (i.e. not the &#8216;Upcoming Event &gt;&#8217; bit at the beginning). As explained in this thread, for some reason in photo view category titles are not displayed at all, so I used the code in this post to fix that: [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/display-category-titles-instead-of-upcoming-events\/","article_modified_time":"2014-06-20T12:27:45+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\/display-category-titles-instead-of-upcoming-events\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/display-category-titles-instead-of-upcoming-events\/","name":"Display Category Titles instead of Upcoming Events -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2014-06-17T14:02:54+00:00","dateModified":"2014-06-20T12:27:45+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/display-category-titles-instead-of-upcoming-events\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/display-category-titles-instead-of-upcoming-events\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/display-category-titles-instead-of-upcoming-events\/#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":"Display Category Titles instead of Upcoming Events"}]},{"@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\/231291","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\/231291\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=231291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}