{"id":945290,"date":"2015-02-28T04:13:51","date_gmt":"2015-02-28T12:13:51","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/inserting-title-and-text-above-each-view\/"},"modified":"2015-03-03T20:31:49","modified_gmt":"2015-03-04T04:31:49","slug":"inserting-title-and-text-above-each-view","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/inserting-title-and-text-above-each-view\/","title":{"rendered":"Inserting Title and Text above each View"},"content":{"rendered":"<p>Hi,<\/p>\n<p>In order to do a simple thing as writing a bit of heading and informative text above our calendar, we need to deal with this ugly script. Why is everything so complicated with TEC? <\/p>\n<p>We need to compile these scripts into 1 script that will display the same Title and Text on Month View, List View, Map View and Day View.<\/p>\n<pre><code>\/\/ Custom Events Month View Title\nadd_filter( &#039;tribe_get_events_title&#039;, &#039;change_month_view_title&#039;, 15 );\n\nfunction change_month_view_title( $title ) {\n\t$look_for = &#039;Events for October 2015&#039;;\n\tif ( false === strpos( $title, $look_for ) ) return $title;\n\treturn &#039;Calendar of Events for Danish Maritime Days \u2013 5- 9 October 2015&#039;;\n}\n\n\/\/ Custom Events Month View Text\nadd_action( &#039;tribe_events_after_the_title&#039;, &#039;add_text_below_month_title&#039; );\n\nfunction add_text_below_month_title() {\n\tif ( ! tribe_is_month() ) return;\n\techo &#039;&lt;p&gt;The calendar is continuously updated with new events. Check back often to plan your personal schedule during Danish Maritime Days. All stakeholders in the global maritime industry are invited to host events as part of Danish Maritime Days. For more information on how to join the platform, please click here.&lt;\/p&gt;&#039;;\n}\n\n\/\/ Custom Events List View Title\nadd_filter( &#039;tribe_get_events_title&#039;, &#039;change_list_view_title&#039;, 15 );\n\nfunction change_list_view_title( $title ) {\n\t$look_for = &#039;Upcoming Events&#039;;\n\tif ( false === strpos( $title, $look_for ) ) return $title;\n\treturn &#039;Calendar of Events for Danish Maritime Days \u2013 5- 9 October 2015&#039;;\n}\n\n\/\/ Custom Events List View Text\nadd_action( &#039;tribe_events_after_the_title&#039;, &#039;add_text_below_list_title&#039; );\n\nfunction add_text_below_list_title() {\n\tif ( ! tribe_is_list_view() ) return;\n\techo &#039;&lt;p&gt;The calendar is continuously updated with new events. Check back often to plan your personal schedule during Danish Maritime Days. All stakeholders in the global maritime industry are invited to host events as part of Danish Maritime Days. For more information on how to join the platform, please click here.&lt;\/p&gt;&#039;;\n}\n<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-945290","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>Inserting Title and Text above each View -<\/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\/inserting-title-and-text-above-each-view\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Inserting Title and Text above each View -\" \/>\n<meta property=\"og:description\" content=\"Hi, In order to do a simple thing as writing a bit of heading and informative text above our calendar, we need to deal with this ugly script. Why is everything so complicated with TEC? We need to compile these scripts into 1 script that will display the same Title and Text on Month View, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/inserting-title-and-text-above-each-view\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-03-04T04:31:49+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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/inserting-title-and-text-above-each-view\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/inserting-title-and-text-above-each-view\/\",\"name\":\"Inserting Title and Text above each View -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-02-28T12:13:51+00:00\",\"dateModified\":\"2015-03-04T04:31:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/inserting-title-and-text-above-each-view\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/inserting-title-and-text-above-each-view\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/inserting-title-and-text-above-each-view\/#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\":\"Inserting Title and Text above each View\"}]},{\"@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":"Inserting Title and Text above each View -","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\/inserting-title-and-text-above-each-view\/","og_locale":"en_US","og_type":"article","og_title":"Inserting Title and Text above each View -","og_description":"Hi, In order to do a simple thing as writing a bit of heading and informative text above our calendar, we need to deal with this ugly script. Why is everything so complicated with TEC? We need to compile these scripts into 1 script that will display the same Title and Text on Month View, [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/inserting-title-and-text-above-each-view\/","article_modified_time":"2015-03-04T04:31:49+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/inserting-title-and-text-above-each-view\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/inserting-title-and-text-above-each-view\/","name":"Inserting Title and Text above each View -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-02-28T12:13:51+00:00","dateModified":"2015-03-04T04:31:49+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/inserting-title-and-text-above-each-view\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/inserting-title-and-text-above-each-view\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/inserting-title-and-text-above-each-view\/#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":"Inserting Title and Text above each View"}]},{"@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\/945290","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":2,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/945290\/revisions"}],"predecessor-version":[{"id":945459,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/945290\/revisions\/945459"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=945290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}