{"id":1012521,"date":"2015-10-07T14:59:50","date_gmt":"2015-10-07T21:59:50","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-tag-for-single-events\/"},"modified":"2015-10-08T14:14:11","modified_gmt":"2015-10-08T21:14:11","slug":"title-tag-for-single-events","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-tag-for-single-events\/","title":{"rendered":"Title tag for single events"},"content":{"rendered":"<p>Hi, I&#8217;ve had a bit of a trial allowing custom title tags for various pages in my site, including some custom post types. Finally got everything working and got the Calendar page to show a title tag as well, but I cannot get the single events pages to show title tags. I tried the global wp-config fix but that did not work, maybe because of my custom code. Is there a way I can target the single events pages in a similar fashion to what I&#8217;ve done below:<\/p>\n<pre><code>&lt;title&gt; &lt;?php $title= get_post_meta($post-&gt;ID, &#039;Title&#039;, true); ?&gt;\n\t\t&lt;?php if( is_single() ) echo $title;\n   \t\t\telseif( is_page() ) echo $title;\n\t\t\telseif( is_page(&#039;calendar&#039;) ) echo $title;\n\t\t\telse wp_title(&#039;&#039;); ?&gt; | &lt;?php bloginfo(&#039;name&#039;); ?&gt;&lt;\/title&gt;<\/code><\/pre>\n<p>Right now all I get for my title tag is &#8221; | Island Gateway&#8221; (the website name). I did notice on another site that is running Events Calendar &#8212; done by a different local organization &#8212; they are having the same issue. <\/p>\n<p>I did try reverting to the WordPress default 2014 theme and that did give me &#8220;Upcoming Events | Event TItle | Site Name&#8221; in the title tag &#8212; even though the event I checked was a &#8220;past&#8221; event. Any assistance would be greatly appreciated, thanks!<\/p>\n","protected":false},"template":"","class_list":["post-1012521","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 tag for single 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\/title-tag-for-single-events\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Title tag for single events -\" \/>\n<meta property=\"og:description\" content=\"Hi, I&#8217;ve had a bit of a trial allowing custom title tags for various pages in my site, including some custom post types. Finally got everything working and got the Calendar page to show a title tag as well, but I cannot get the single events pages to show title tags. I tried the global [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-tag-for-single-events\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-10-08T21:14:11+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-tag-for-single-events\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-tag-for-single-events\/\",\"name\":\"Title tag for single events -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-10-07T21:59:50+00:00\",\"dateModified\":\"2015-10-08T21:14:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-tag-for-single-events\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-tag-for-single-events\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-tag-for-single-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\":\"Title tag for single 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":"Title tag for single 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\/title-tag-for-single-events\/","og_locale":"en_US","og_type":"article","og_title":"Title tag for single events -","og_description":"Hi, I&#8217;ve had a bit of a trial allowing custom title tags for various pages in my site, including some custom post types. Finally got everything working and got the Calendar page to show a title tag as well, but I cannot get the single events pages to show title tags. I tried the global [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-tag-for-single-events\/","article_modified_time":"2015-10-08T21:14:11+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-tag-for-single-events\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-tag-for-single-events\/","name":"Title tag for single events -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-10-07T21:59:50+00:00","dateModified":"2015-10-08T21:14:11+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-tag-for-single-events\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-tag-for-single-events\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/title-tag-for-single-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":"Title tag for single 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\/1012521","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\/1012521\/revisions"}],"predecessor-version":[{"id":1012696,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1012521\/revisions\/1012696"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1012521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}