{"id":962380,"date":"2015-05-13T11:15:41","date_gmt":"2015-05-13T18:15:41","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-title-depends-of-event-type\/"},"modified":"2015-05-29T09:38:59","modified_gmt":"2015-05-29T16:38:59","slug":"how-to-change-title-depends-of-event-type","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-title-depends-of-event-type\/","title":{"rendered":"How to change title depends of Event Type?"},"content":{"rendered":"<p>Hello,<br \/>\nOur events are divided in 2 types. We created these types as Event Tags.<\/p>\n<p>So we have 2 mainly urls:<br \/>\n\u2013 Events type 1: site.com\/events\/?tribe_event_display=list&amp;tribe_tags=137<br \/>\n\u2013 Events Type 2: site.com\/events\/?tribe_event_display=list&amp;tribe_tags=138<\/p>\n<p>How to change the title &#8220;Upcoming Events&#8221; depends of Event Type?<\/p>\n<p>Actually I did it with this jQuery:<\/p>\n<pre><code>\tjQuery( document ).ready(function() {\n\t\tvar actualUrl = window.location.href.toLowerCase();\n    if (actualUrl.indexOf(&quot;\/events\/&quot;) &gt; -1) {\n    \tvar eventType = getUrlParameter(&quot;tribe_tags&quot;);\n    \tvar newTitle = &quot;&quot; ;\n      if (eventType==&quot;137&quot;) {\n      \tnewTitle = &quot;Events Type 1&quot; ;\n      };\n      if (eventType==&quot;138&quot;) {\n      \tnewTitle = &quot;Events Type 1&quot; ;\n      };\n      if (newTitle!=&quot;&quot;) {\n      \tjQuery( &quot;h2.tribe-events-page-title&quot; ).text(newTitle);\n      };\n    };\n<\/code><\/pre>\n<p>This code works OK when the events page is loaded, but when we click into &#8220;Next Events \u00bb&#8221; link or the previous one, we lose the new title. Its because the next events are loaded via Ajax, so our code isn&#8217;t load again.<\/p>\n<p>Any idea to do it?<\/p>\n<p>Thanks<\/p>\n","protected":false},"template":"","class_list":["post-962380","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>How to change title depends of Event Type? -<\/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\/how-to-change-title-depends-of-event-type\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to change title depends of Event Type? -\" \/>\n<meta property=\"og:description\" content=\"Hello, Our events are divided in 2 types. We created these types as Event Tags. So we have 2 mainly urls: \u2013 Events type 1: site.com\/events\/?tribe_event_display=list&amp;tribe_tags=137 \u2013 Events Type 2: site.com\/events\/?tribe_event_display=list&amp;tribe_tags=138 How to change the title &#8220;Upcoming Events&#8221; depends of Event Type? Actually I did it with this jQuery: jQuery( document ).ready(function() { var actualUrl [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-title-depends-of-event-type\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-05-29T16:38:59+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\/how-to-change-title-depends-of-event-type\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-title-depends-of-event-type\/\",\"name\":\"How to change title depends of Event Type? -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-05-13T18:15:41+00:00\",\"dateModified\":\"2015-05-29T16:38:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-title-depends-of-event-type\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-title-depends-of-event-type\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-title-depends-of-event-type\/#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\":\"How to change title depends of Event Type?\"}]},{\"@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":"How to change title depends of Event Type? -","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\/how-to-change-title-depends-of-event-type\/","og_locale":"en_US","og_type":"article","og_title":"How to change title depends of Event Type? -","og_description":"Hello, Our events are divided in 2 types. We created these types as Event Tags. So we have 2 mainly urls: \u2013 Events type 1: site.com\/events\/?tribe_event_display=list&amp;tribe_tags=137 \u2013 Events Type 2: site.com\/events\/?tribe_event_display=list&amp;tribe_tags=138 How to change the title &#8220;Upcoming Events&#8221; depends of Event Type? Actually I did it with this jQuery: jQuery( document ).ready(function() { var actualUrl [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-title-depends-of-event-type\/","article_modified_time":"2015-05-29T16:38:59+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\/how-to-change-title-depends-of-event-type\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-title-depends-of-event-type\/","name":"How to change title depends of Event Type? -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-05-13T18:15:41+00:00","dateModified":"2015-05-29T16:38:59+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-title-depends-of-event-type\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-title-depends-of-event-type\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-change-title-depends-of-event-type\/#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":"How to change title depends of Event Type?"}]},{"@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\/962380","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\/962380\/revisions"}],"predecessor-version":[{"id":962590,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/962380\/revisions\/962590"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=962380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}