{"id":1052614,"date":"2016-01-08T08:29:28","date_gmt":"2016-01-08T16:29:28","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/evants-page-title-is-blog-archives\/"},"modified":"2016-01-22T10:43:00","modified_gmt":"2016-01-22T18:43:00","slug":"evants-page-title-is-blog-archives","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/evants-page-title-is-blog-archives\/","title":{"rendered":"Events Page title is Blog Archives"},"content":{"rendered":"<p>Hello, my events page displays Blog Archives as the title:<\/p>\n<p>I found a discussion about that and there is some code provided .. I just want to be sure I am using the code correctly.<\/p>\n<p>This is the code:<\/p>\n<pre><code>if( tribe_is_month() || tribe_is_week() || tribe_is_day() || tribe_is_map() ) {\r\n  $title = \"&lt;h1&gt;Calendar&lt;\/h1&gt;\";\r\n  } elseif( tribe_is_past() || tribe_is_upcoming() ) {  \r\n  $title = \"&lt;h1&gt;Calendar&lt;\/h1&gt;\";\r\n  } else {\r\n}<\/code><\/pre>\n<p>And here I inserted it. Is this ok?<\/p>\n<pre><code>&lt;?php\r\nif (is_single()):\r\n    $options = thrive_get_options_for_post(get_the_ID());\r\n    $post_format = get_post_format();\r\n    $post_format_options = _thrive_get_post_format_fields($post_format, get_the_ID());\r\n    if (isset($options['meta_author_name']) &amp;&amp; $options['meta_author_name'] == 1) {\r\n        $author_info = _thrive_get_author_info(get_the_author_meta('ID'));\r\n    }\r\n    $thrive_meta_postformat_video_type = get_post_meta(get_the_ID(), '_thrive_meta_postformat_video_type', true);\r\n    $vimeo_embed_class='';\r\n    if ($thrive_meta_postformat_video_type == \"vimeo\") {\r\n        $vimeo_embed_class = \"v-cep\";\r\n    }\r\n    ?&gt;\r\n\r\nif( tribe_is_month() || tribe_is_week() || tribe_is_day() || tribe_is_map() ) {\r\n  $title = \"&lt;h1&gt;Calendar&lt;\/h1&gt;\";\r\n  } elseif( tribe_is_past() || tribe_is_upcoming() ) {  \r\n  $title = \"&lt;h1&gt;Calendar&lt;\/h1&gt;\";\r\n  } else {\r\n}\r\n\r\n    &lt;?php if ($post_format == \"quote\"): ?&gt;\r\n    &lt;div class=\"quo\"&gt;\r\n        &lt;h1&gt;&lt;?php echo $post_format_options['quote_text']; ?&gt;&lt;\/h1&gt;\r\n        &lt;?php if (!empty($post_format_options['quote_author'])): ?&gt;\r\n            &lt;p&gt; &lt;?php echo $post_format_options['quote_author']; ?&gt;&lt;\/p&gt;\r\n        &lt;?php endif; ?&gt;\r\n    &lt;\/div&gt;\r\n&lt;?php elseif ($post_format == \"video\"): ?&gt;\r\n    &lt;?php $wistiaVideoCode = (strpos($post_format_options['video_code'], \"wistia\") !== false) ? ' wistia-video-container' : ''; ?&gt;\r\n    &lt;div class=\"vt &lt;?php echo $vimeo_embed_class;echo $wistiaVideoCode;?&gt;\"&gt;\r\n        &lt;div class=\"vt-t\"&gt;\r\n            &lt;?php if ($options['show_post_title'] != 0): ?&gt;\r\n                &lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;\/h1&gt;\r\n            &lt;?php endif; ?&gt;\r\n            &lt;?php if (!empty($post_format_options['video_code'])) : ?&gt;\r\n                &lt;div class=\"pvb\"&gt;\r\n                    &lt;a href=\"\"&gt;&lt;\/a&gt;\r\n                &lt;\/div&gt;\r\n            &lt;?php endif ?&gt;\r\n        &lt;\/div&gt;\r\n        &lt;?php if (!empty($post_format_options['video_code'])) : ?&gt;\r\n            &lt;div class=\"vt-v\"&gt;\r\n                &lt;div class=\"vt-vi\"&gt;\r\n                    &lt;?php echo $post_format_options['video_code']; ?&gt;\r\n                &lt;\/div&gt;\r\n            &lt;\/div&gt;\r\n        &lt;?php endif ?&gt;\r\n    &lt;\/div&gt;\r\n&lt;?php\r\nelse: ?&gt;\r\n    &lt;?php if ($options['show_post_title'] != 0): ?&gt;\r\n        &lt;h1 class=\"entry-title\"&gt;&lt;?php the_title(); ?&gt;&lt;\/h1&gt;\r\n    &lt;?php endif; ?&gt;\r\n&lt;?php endif; ?&gt;\r\n    &lt;?php if (get_post_meta(get_the_ID(), \"_thrive_meta_show_content_title\", true) == 1): ?&gt;\r\n    &lt;?php echo do_shortcode(get_post_meta(get_the_ID(), \"_thrive_meta_content_title\", true)); ?&gt;\r\n&lt;?php endif; ?&gt;\r\n\r\n    &lt;?php if ($options['meta_author_name'] == 1 || $options['meta_post_category'] == 1):\r\n    ?&gt;\r\n    &lt;p&gt;\r\n        &lt;?php if ($options['meta_author_name'] == 1): ?&gt;\r\n            &lt;?php _e(\"By\", 'thrive'); ?&gt;\r\n            &lt;a href=\"&lt;?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?&gt;\"&gt;&lt;?php echo $author_info['display_name']; ?&gt;&lt;\/a&gt;\r\n        &lt;?php endif; ?&gt;\r\n        &lt;?php if ($options['meta_author_name'] == 1 &amp;&amp; $options['meta_post_category'] == 1): ?&gt;\r\n            &lt;span class=\"sep\"&gt;|&lt;\/span&gt;\r\n        &lt;?php endif; ?&gt;\r\n        &lt;?php\r\n        if ($options['meta_post_category'] == 1):\r\n            $categories = get_the_category();\r\n            if ($categories &amp;&amp; count($categories) &gt; 0):\r\n                ?&gt;\r\n                &lt;a href=\"&lt;?php echo get_category_link($categories[0]-&gt;term_id); ?&gt;\"&gt;&lt;?php echo $categories[0]-&gt;cat_name; ?&gt;&lt;\/a&gt;\r\n            &lt;?php endif; ?&gt;\r\n        &lt;?php endif; ?&gt;\r\n    &lt;\/p&gt;\r\n&lt;?php endif; ?&gt;\r\n\r\n&lt;?php endif; ?&gt;\r\n\r\n&lt;?php\r\nif (is_page()):\r\n    $options = thrive_get_options_for_post(get_the_ID());\r\n    ?&gt;\r\n    &lt;?php if ($options['show_post_title'] != 0): ?&gt;\r\n    &lt;h1 class=\"entry-title\"&gt;&lt;?php the_title(); ?&gt;&lt;\/h1&gt;\r\n&lt;?php endif; ?&gt;\r\n    &lt;?php if (get_post_meta(get_the_ID(), \"_thrive_meta_show_content_title\", true) == 1): ?&gt;\r\n    &lt;?php echo do_shortcode(get_post_meta(get_the_ID(), \"_thrive_meta_content_title\", true)); ?&gt;\r\n&lt;?php endif; ?&gt;\r\n&lt;?php endif; ?&gt;\r\n\r\n&lt;?php if (is_author()): ?&gt;\r\n    &lt;h1 class=\"entry-title\"&gt;&lt;?php _e(\"All Posts by\", 'thrive'); ?&gt; &lt;?php echo get_the_author(); ?&gt;&lt;\/h1&gt;\r\n&lt;?php endif; ?&gt;\r\n\r\n&lt;?php $is_shop_page = function_exists('is_shop') ? is_shop(): false; ?&gt;\r\n\r\n&lt;?php if (is_archive() &amp;&amp; !is_author() &amp;&amp; !is_category() &amp;&amp; !is_tag() &amp;&amp; !is_search() &amp;&amp; !$is_shop_page): ?&gt;\r\n    &lt;h1 class=\"entry-title\"&gt;\r\n        &lt;?php if (is_day()) : ?&gt;\r\n            &lt;?php printf(__('Daily Archives: %s', 'thrive'), '' . get_the_date() . ''); ?&gt;\r\n        &lt;?php elseif (is_month()) : ?&gt;\r\n            &lt;?php printf(__('Monthly Archives: %s', 'thrive'), '' . get_the_date(_x('F Y', 'monthly archives date format', 'thrive')) . ''); ?&gt;\r\n        &lt;?php\r\n        elseif (is_year()) : ?&gt;\r\n            &lt;?php printf(__('Yearly Archives: %s', 'thrive'), '' . get_the_date(_x('Y', 'yearly archives date format', 'thrive')) . ''); ?&gt;\r\n        &lt;?php\r\n        else : ?&gt;\r\n            &lt;?php _e('Blog Archives', 'thrive'); ?&gt;\r\n        &lt;?php endif; ?&gt;\r\n    &lt;\/h1&gt;\r\n\r\n&lt;?php endif; ?&gt;\r\n\r\n&lt;?php if (is_category()): ?&gt;\r\n    &lt;h1 class=\"entry-title\"&gt;&lt;?php printf(__('Category Archives for \"%s\"', 'thrive'), '' . single_cat_title('', false) . ''); ?&gt;&lt;\/h1&gt;\r\n&lt;?php endif; ?&gt;\r\n\r\n&lt;?php if (is_search()): ?&gt;\r\n    &lt;h1 class=\"entry-title\"&gt;&lt;?php printf(__('Search Results for: %s', 'thrive'), '' . get_search_query() . ''); ?&gt;&lt;\/h1&gt;\r\n&lt;?php endif; ?&gt;\r\n\r\n&lt;?php if (is_tag()): ?&gt;\r\n    &lt;h1 class=\"entry-title\"&gt;&lt;?php printf(__('Tag Archives for \" %s \" ', 'thrive'), '' . single_tag_title('', false) . ''); ?&gt;&lt;\/h1&gt;\r\n&lt;?php endif; ?&gt;<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-1052614","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>Events Page title is Blog Archives -<\/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\/evants-page-title-is-blog-archives\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Events Page title is Blog Archives -\" \/>\n<meta property=\"og:description\" content=\"Hello, my events page displays Blog Archives as the title: I found a discussion about that and there is some code provided .. I just want to be sure I am using the code correctly. This is the code: if( tribe_is_month() || tribe_is_week() || tribe_is_day() || tribe_is_map() ) { $title = &quot;&lt;h1&gt;Calendar&lt;\/h1&gt;&quot;; } elseif( tribe_is_past() [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/evants-page-title-is-blog-archives\/\" \/>\n<meta property=\"article:modified_time\" content=\"2016-01-22T18:43:00+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=\"5 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\/evants-page-title-is-blog-archives\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/evants-page-title-is-blog-archives\/\",\"name\":\"Events Page title is Blog Archives -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-01-08T16:29:28+00:00\",\"dateModified\":\"2016-01-22T18:43:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/evants-page-title-is-blog-archives\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/evants-page-title-is-blog-archives\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/evants-page-title-is-blog-archives\/#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\":\"Events Page title is Blog Archives\"}]},{\"@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":"Events Page title is Blog Archives -","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\/evants-page-title-is-blog-archives\/","og_locale":"en_US","og_type":"article","og_title":"Events Page title is Blog Archives -","og_description":"Hello, my events page displays Blog Archives as the title: I found a discussion about that and there is some code provided .. I just want to be sure I am using the code correctly. This is the code: if( tribe_is_month() || tribe_is_week() || tribe_is_day() || tribe_is_map() ) { $title = \"&lt;h1&gt;Calendar&lt;\/h1&gt;\"; } elseif( tribe_is_past() [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/evants-page-title-is-blog-archives\/","article_modified_time":"2016-01-22T18:43:00+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/evants-page-title-is-blog-archives\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/evants-page-title-is-blog-archives\/","name":"Events Page title is Blog Archives -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-01-08T16:29:28+00:00","dateModified":"2016-01-22T18:43:00+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/evants-page-title-is-blog-archives\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/evants-page-title-is-blog-archives\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/evants-page-title-is-blog-archives\/#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":"Events Page title is Blog Archives"}]},{"@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\/1052614","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":5,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1052614\/revisions"}],"predecessor-version":[{"id":1052920,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1052614\/revisions\/1052920"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1052614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}