<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Post category titles and posts display logic]]></title><description><![CDATA[<p dir="auto">Trying to figure out how to display the category title/name in the post display. Seems like it should be something like &lt;h3&gt;[? $post['post_category_title'] ?]&lt;/h3&gt; but no variations other than 'post_category_id' seem to work (which just shows the category number).</p>
<hr />
<p dir="auto">Also wanting to set up logic to check if there's any posts within a particular category, and if not make the section containing the posts display block not appear on the page. Something like:</p>
<p dir="auto">&lt;logic:if test="<em>CODE TO CHECK IF THERE'S POSTS IN CATEGORY 3</em>"&gt;<br />
<a rel="nofollow ugc">templates:section</a><br />
&lt;p&gt;West End:&lt;/p&gt;<br />
&lt;data:postrepeater paging="true" pagingrows="6" templatetype="list" postcategory="3" /&gt;<br />
&lt;/templates:section&gt;<br />
&lt;/logic:if&gt;</p>
]]></description><link>https://community.oncord.com/topic/24/post-category-titles-and-posts-display-logic</link><generator>RSS for Node</generator><lastBuildDate>Mon, 18 May 2026 21:01:37 GMT</lastBuildDate><atom:link href="https://community.oncord.com/topic/24.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 02 Aug 2024 01:05:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Post category titles and posts display logic on Fri, 13 Sep 2024 05:43:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.oncord.com/uid/12">@Ben</a></p>
<p dir="auto">We currently have a tutorial on how to list post-category values. You can check it out here:<br />
<a href="https://www.oncord.com/developer/tutorials/posts/show-post-categories/" rel="nofollow ugc">Show Categories for a Post</a></p>
<p dir="auto">This guide will show you how to display all the categories associated with a post. If you only want to display the primary category, you can use the following code:</p>
<pre><code>\Components\Website\Posts\Categories::getColumn($post['post_category_id'], 'post_category_title')
</code></pre>
<p dir="auto">To check if there are posts in a category, you can use this code:</p>
<pre><code class="language-&lt;logic:variable">
&lt;logic:if test="$post"&gt;
     &lt;p&gt;West End:&lt;/p&gt; 
     &lt;data:postrepeater paging="true" pagingrows="6" templatetype="list" postcategory="3" /&gt;
&lt;/logic:if&gt;```</code></pre>
]]></description><link>https://community.oncord.com/post/64</link><guid isPermaLink="true">https://community.oncord.com/post/64</guid><dc:creator><![CDATA[kimguevarra]]></dc:creator><pubDate>Fri, 13 Sep 2024 05:43:27 GMT</pubDate></item></channel></rss>