{"id":21520,"date":"2012-07-05T00:01:03","date_gmt":"2012-07-05T07:01:03","guid":{"rendered":"http:\/\/tri.be\/support\/forums\/topic\/events-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/"},"modified":"2012-07-13T06:55:44","modified_gmt":"2012-07-13T13:55:44","slug":"events-calendar-pro-bug-when-using-categories-and-question-to-dev-team","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/","title":{"rendered":"Events Calendar PRO: bug when using categories and question to dev team"},"content":{"rendered":"<p>Thank you Jonah, I appreciate you taking time to help me out. But I don&#8217;t get it. Let me tell you what I did so far, so maybe it will be easier for both of us when we know what has been done and what works and doesn&#8217;t.<\/p>\n<p>This is more complete description, one I gave you before was simpler version.<\/p>\n<p>So my wordpress has several homepages = cities.<\/p>\n<p>City: Gudauri<br \/>\nHomepage: http:\/\/develop.primediart.com\/project\/Sandroz\/gudauri\/<br \/>\nGudauri Events: http:\/\/develop.primediart.com\/project\/Sandroz\/events\/category\/gudauri-events\/<\/p>\n<p>City: Batumi<br \/>\nHomepage: http:\/\/develop.primediart.com\/project\/Sandroz\/batumi\/<br \/>\nBatumi Events: http:\/\/develop.primediart.com\/project\/Sandroz\/events\/category\/batumi-events\/<\/p>\n<p>I wanted to include city specific calendars on their respective homepages.<br \/>\nSo I did this on frontpages: <\/p>\n<p>And in table.php in line no. 24 i added:<br \/>\nif(isset($myCity)){ \/\/if its called from front page,in front page $mycity is set<br \/>\n$eventCat=get_category_id($myCity);<br \/>\n$eventPosts = tribe_get_events( array( &#8216;eventCat&#8217; =&gt; $eventCat, &#8216;time_order&#8217; =&gt; &#8216;ASC&#8217;, &#8216;eventDisplay&#8217;=&gt;&#8217;month&#8217; ) );<br \/>\n}<br \/>\n\/\/ in an events cat<br \/>\nelseif ( is_tax( $tribe_ecp-&gt;get_event_taxonomy() ) ) {<br \/>\n    $cat = get_term_by( &#8216;slug&#8217;, get_query_var(&#8216;term&#8217;), $tribe_ecp-&gt;get_event_taxonomy() );<br \/>\n    $eventCat = (int) $cat-&gt;term_id;<br \/>\n    $eventPosts = tribe_get_events( array( &#8216;eventCat&#8217; =&gt; $eventCat, &#8216;time_order&#8217; =&gt; &#8216;ASC&#8217;, &#8216;eventDisplay&#8217;=&gt;&#8217;month&#8217; ) );<br \/>\n}<br \/>\n\/\/ not in a cat<br \/>\nelse {<br \/>\n    $eventPosts = tribe_get_events(array( &#8216;eventDisplay&#8217;=&gt;&#8217;month&#8217; ));<br \/>\n}<\/p>\n<p>THe first if{} condition so that if the $mycity variable is set in front page then it will fetch the event of That particular city category as it is being called in front page, otherwise the below usual loop will work. Like wise here among these lines i tried with sevral codes to put the category like $mycity.&#8221;-events&#8221; bcause the events categories are like this &#8220;gudauri-events&#8221; and normal front page categories are like this &#8220;gudauri&#8221;.<\/p>\n<p>And for doing the same for the events i did this which is working fine:<br \/>\n$args = array(<br \/>\n    &#8216;tax_query&#8217; =&gt; array(<br \/>\n        array(<br \/>\n            &#8216;taxonomy&#8217; =&gt; &#8216;tribe_events_cat&#8217;,<br \/>\n            &#8216;field&#8217; =&gt; &#8216;slug&#8217;,<br \/>\n            &#8216;terms&#8217; =&gt; $terms_category\/\/in home page its assigned to mycity_event name<br \/>\n        )<br \/>\n    ),<br \/>\n       &#8216;posts_per_page&#8217; =&gt; 30,&#8217;order&#8217;=&gt;&#8217;ASC&#8217;,&#8217;orderby&#8217;=&gt;&#8217;modified&#8217;,&#8217;post_type&#8217;=&gt;&#8217;tribe_events&#8217;,&#8217;eventDisplay&#8217;=&gt;&#8217;upcoming&#8217;<br \/>\n);<br \/>\n\/\/$postslist = query_posts(&#8216;order=ASC&amp;orderby=modified&amp;posts_per_page=4&amp;post_type=tribe_events&amp;eventDisplay=upcoming&#8217;);<br \/>\n$postslist = query_posts($args);?&gt;<\/p>\n<p>I&#8217;m attaching modified files so you can take a better look.<br \/>\ntable.php -&gt; http:\/\/pastebin.com\/Ci2id4qE<br \/>\ncalendar-frontpage.php -&gt; http:\/\/pastebin.com\/1AMLFGRd<\/p>\n<p>Hope this is much clearer explanation of what I&#8217;m doing and direction I&#8217;m going. Any thoughts on this?<\/p>\n","protected":false},"template":"","class_list":["post-21520","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 Calendar PRO: bug when using categories and question to dev team -<\/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-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Events Calendar PRO: bug when using categories and question to dev team -\" \/>\n<meta property=\"og:description\" content=\"Thank you Jonah, I appreciate you taking time to help me out. But I don&#8217;t get it. Let me tell you what I did so far, so maybe it will be easier for both of us when we know what has been done and what works and doesn&#8217;t. This is more complete description, one I [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/\" \/>\n<meta property=\"article:modified_time\" content=\"2012-07-13T13:55:44+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\/events-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/\",\"name\":\"Events Calendar PRO: bug when using categories and question to dev team -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2012-07-05T07:01:03+00:00\",\"dateModified\":\"2012-07-13T13:55:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/#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 Calendar PRO: bug when using categories and question to dev team\"}]},{\"@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 Calendar PRO: bug when using categories and question to dev team -","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-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/","og_locale":"en_US","og_type":"article","og_title":"Events Calendar PRO: bug when using categories and question to dev team -","og_description":"Thank you Jonah, I appreciate you taking time to help me out. But I don&#8217;t get it. Let me tell you what I did so far, so maybe it will be easier for both of us when we know what has been done and what works and doesn&#8217;t. This is more complete description, one I [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/","article_modified_time":"2012-07-13T13:55:44+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\/events-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/","name":"Events Calendar PRO: bug when using categories and question to dev team -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2012-07-05T07:01:03+00:00","dateModified":"2012-07-13T13:55:44+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-calendar-pro-bug-when-using-categories-and-question-to-dev-team\/#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 Calendar PRO: bug when using categories and question to dev team"}]},{"@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\/21520","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":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/21520\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=21520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}