{"id":953977,"date":"2015-04-08T06:04:44","date_gmt":"2015-04-08T13:04:44","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-blog-loop-how-can-fetch-and-display-event-categories\/"},"modified":"2015-04-09T07:11:20","modified_gmt":"2015-04-09T14:11:20","slug":"events-in-blog-loop-how-can-fetch-and-display-event-categories","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-blog-loop-how-can-fetch-and-display-event-categories\/","title":{"rendered":"Events in blog loop: How can fetch and display event categories?"},"content":{"rendered":"<p>A pre-sales question: I installed the free version of The Event Calendar and so far it seems to be perfect for my site. The few features I&#8217;m missing seem to be included in PRO.<\/p>\n<p>One thing I haven&#8217;t been able to get working yet:<\/p>\n<p>My site show previews of the six most recent blog posts on the front page. Included in theese previews are (1) title, (2) image, (3) date, (4) comment count, and lastly, (5) category. In the plugin settings of The Event Calendar, I activated the option to add events to the blog loop, so both regular blog posts and events are shown. However, the category (5) is not included when an event is displayed.<\/p>\n<p>My WordPress template fetches and displays blog post categ<br \/>\nories via the following three lines of code:<\/p>\n<p>&lt;?php if (has_category()) : ?&gt;<br \/>\n\t\t\t&lt;p class=&#8221;post-categories&#8221;&gt;&lt;?php the_category(&#8216;, &#8216;); ?&gt;&lt;\/p&gt;<br \/>\n\t\t&lt;?php endif; ?&gt;<\/p>\n<p>How can I modify these three lines so event categories are displayed as well?<\/p>\n<p>Thanks in advance for your help! The Event Calendar is amazing so far.<\/p>\n","protected":false},"template":"","class_list":["post-953977","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 blog loop: How can fetch and display event categories? -<\/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-blog-loop-how-can-fetch-and-display-event-categories\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Events in blog loop: How can fetch and display event categories? -\" \/>\n<meta property=\"og:description\" content=\"A pre-sales question: I installed the free version of The Event Calendar and so far it seems to be perfect for my site. The few features I&#8217;m missing seem to be included in PRO. One thing I haven&#8217;t been able to get working yet: My site show previews of the six most recent blog posts [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-blog-loop-how-can-fetch-and-display-event-categories\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-04-09T14:11:20+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\/events-in-blog-loop-how-can-fetch-and-display-event-categories\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-blog-loop-how-can-fetch-and-display-event-categories\/\",\"name\":\"Events in blog loop: How can fetch and display event categories? -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-04-08T13:04:44+00:00\",\"dateModified\":\"2015-04-09T14:11:20+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-blog-loop-how-can-fetch-and-display-event-categories\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-blog-loop-how-can-fetch-and-display-event-categories\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-blog-loop-how-can-fetch-and-display-event-categories\/#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\":\"Welcome!\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/_welcome\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Pre-Sales Questions\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/_welcome\/pre-sales-questions\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Events in blog loop: How can fetch and display event categories?\"}]},{\"@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 blog loop: How can fetch and display event categories? -","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-blog-loop-how-can-fetch-and-display-event-categories\/","og_locale":"en_US","og_type":"article","og_title":"Events in blog loop: How can fetch and display event categories? -","og_description":"A pre-sales question: I installed the free version of The Event Calendar and so far it seems to be perfect for my site. The few features I&#8217;m missing seem to be included in PRO. One thing I haven&#8217;t been able to get working yet: My site show previews of the six most recent blog posts [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-blog-loop-how-can-fetch-and-display-event-categories\/","article_modified_time":"2015-04-09T14:11:20+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\/events-in-blog-loop-how-can-fetch-and-display-event-categories\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-blog-loop-how-can-fetch-and-display-event-categories\/","name":"Events in blog loop: How can fetch and display event categories? -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-04-08T13:04:44+00:00","dateModified":"2015-04-09T14:11:20+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-blog-loop-how-can-fetch-and-display-event-categories\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-blog-loop-how-can-fetch-and-display-event-categories\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-in-blog-loop-how-can-fetch-and-display-event-categories\/#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":"Welcome!","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/_welcome\/"},{"@type":"ListItem","position":4,"name":"Pre-Sales Questions","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/_welcome\/pre-sales-questions\/"},{"@type":"ListItem","position":5,"name":"Events in blog loop: How can fetch and display event categories?"}]},{"@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\/953977","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\/953977\/revisions"}],"predecessor-version":[{"id":954013,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/953977\/revisions\/954013"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=953977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}