Skip to main content

Showing Posts of a Certain Tag on Another Page: Shows Parent

I am trying to get the result of displaying posts, filtered by tag on another page. However, the only thing displayed is the parent Blog container. This is my code, taken directly from this tutorial.

{% tag "action_alert" with "homepage_alert" %}  

File _homepage_alert.html

{% for post in tag.most_recent_published_pages_no_pagination limit: 1 %}
<h2 class="headline text-color">
<span class="border-color"><i class="fa fa-exclamation-triangle"></i> Action Alerts</span>
</h2>
<div class="row recent-blogs">
<div class="col-sm-12">
<div class="recent-blog">
<div class="recent-blog-desc">
<h3 class="primary-font">
<a href="{{ post.url }}">{{ post.name }}</a>
</h3>
<hr>
<p>{{ post.blog_post.content | truncatewords:50 | strip_html }}</p>
<a class="btn btn-lg btn-color" href="{{ post.url }}">Take Action!</a>
</div>
</div>
</div>
</div>
{% endfor %}

Share this post

Showing 2 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.