So, I am new. I want to display the 1-n most recent posts in the same category as the current entry (preferably excluding the current entry) -- i.e., I want to have a section with Other Similar Posts at the bottom of an entry page.
I only have one Category Group = beerStyles. There are multiple categories to choose from in beerStyles. Each news entry includes a field called "style" to assign a category from beerStyles. Each entry can have only 1 category. (Note there is no entries field in news entry, just the style field to select a category form beerStyles.)
<aside>
<h4 class="text-center">Related Posts</h4>
<div class="columns">
<ul class="medium-block-grid-3">
{% set category = craft.categories.slug('beerStyles') %}
{% set entries = craft.entries.relatedTo(category) %}
{% for entry in entries %}
<li class="text-center"><a href="{{entry.url}}">{{entry.title}}</a></li>
{% endfor %}
</ul>
</div>
</aside>
No error is thrown, but other news entries with the same category assigned are not appearing. Nothing is appearing.
Any thoughts? And thank you in advance for your time and assistance.
P.S. I know I left off the .limit(x) to limit the number of posts I just want to get it working first.
{% set cats = craft.categories.group('magazineCategory') %}
craft.categories.group('yourGroup').slug('beerStyles')