{"id":1000263,"date":"2015-08-29T22:36:30","date_gmt":"2015-08-30T05:36:30","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-the-main-post-loop\/"},"modified":"2015-09-15T07:05:09","modified_gmt":"2015-09-15T14:05:09","slug":"events-in-the-main-post-loop","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-the-main-post-loop\/","title":{"rendered":"EVENTS IN THE MAIN POST LOOP"},"content":{"rendered":"<p>How can the English language event in the main post loop.<\/p>\n<p>http:\/\/jimmyhome.ns2go.com\/hkadc1   is work<\/p>\n<p>http:\/\/jimmyhome.ns2go.com\/hkadc1\/en  is not work<\/p>\n<p>add_filter(&#8216;pre_get_posts&#8217;, &#8216;query_post_type&#8217;);<br \/>\nfunction query_post_type($query) {<br \/>\n  if(is_archive() || is_tag() || is_home() &amp;&amp; empty( $query-&gt;query_vars[&#8216;suppress_filters&#8217;] ) ) {<br \/>\n    $post_type = get_query_var(&#8216;post_type&#8217;);<br \/>\n\tif($post_type)<br \/>\n\t    $post_type = $post_type;<br \/>\n\telse<br \/>\n\t    $post_type = array(&#8216;post&#8217;,&#8217;tribe_events&#8217;,&#8217;attachment&#8217;);<br \/>\n    $query-&gt;set(&#8216;post_type&#8217;,$post_type);<br \/>\n\treturn $query;<br \/>\n    }<br \/>\n}<\/p>\n","protected":false},"template":"","class_list":["post-1000263","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 IN THE MAIN POST LOOP -<\/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\/events-in-the-main-post-loop\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"EVENTS IN THE MAIN POST LOOP -\" \/>\n<meta property=\"og:description\" content=\"How can the English language event in the main post loop. http:\/\/jimmyhome.ns2go.com\/hkadc1 is work http:\/\/jimmyhome.ns2go.com\/hkadc1\/en is not work add_filter(&#8216;pre_get_posts&#8217;, &#8216;query_post_type&#8217;); function query_post_type($query) { if(is_archive() || is_tag() || is_home() &amp;&amp; empty( $query-&gt;query_vars[&#8216;suppress_filters&#8217;] ) ) { $post_type = get_query_var(&#8216;post_type&#8217;); if($post_type) $post_type = $post_type; else $post_type = array(&#8216;post&#8217;,&#8217;tribe_events&#8217;,&#8217;attachment&#8217;); $query-&gt;set(&#8216;post_type&#8217;,$post_type); return $query; } }\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-the-main-post-loop\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-09-15T14:05:09+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-the-main-post-loop\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-the-main-post-loop\/\",\"name\":\"EVENTS IN THE MAIN POST LOOP -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-08-30T05:36:30+00:00\",\"dateModified\":\"2015-09-15T14:05:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-the-main-post-loop\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-the-main-post-loop\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-the-main-post-loop\/#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 IN THE MAIN POST LOOP\"}]},{\"@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 IN THE MAIN POST LOOP -","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\/events-in-the-main-post-loop\/","og_locale":"en_US","og_type":"article","og_title":"EVENTS IN THE MAIN POST LOOP -","og_description":"How can the English language event in the main post loop. http:\/\/jimmyhome.ns2go.com\/hkadc1 is work http:\/\/jimmyhome.ns2go.com\/hkadc1\/en is not work add_filter(&#8216;pre_get_posts&#8217;, &#8216;query_post_type&#8217;); function query_post_type($query) { if(is_archive() || is_tag() || is_home() &amp;&amp; empty( $query-&gt;query_vars[&#8216;suppress_filters&#8217;] ) ) { $post_type = get_query_var(&#8216;post_type&#8217;); if($post_type) $post_type = $post_type; else $post_type = array(&#8216;post&#8217;,&#8217;tribe_events&#8217;,&#8217;attachment&#8217;); $query-&gt;set(&#8216;post_type&#8217;,$post_type); return $query; } }","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-the-main-post-loop\/","article_modified_time":"2015-09-15T14:05:09+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-the-main-post-loop\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-the-main-post-loop\/","name":"EVENTS IN THE MAIN POST LOOP -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-08-30T05:36:30+00:00","dateModified":"2015-09-15T14:05:09+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-the-main-post-loop\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-the-main-post-loop\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-the-main-post-loop\/#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 IN THE MAIN POST LOOP"}]},{"@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\/1000263","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\/1000263\/revisions"}],"predecessor-version":[{"id":1000265,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1000263\/revisions\/1000265"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1000263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}