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 %}
Showing 2 reactions
Sign in with
{% 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="%7B%7B%20post.url%20%7D%7D">{{ post.name }}</a> </h3> <hr> <p>{{ post.blog_post.content | truncatewords:50 | strip_html }}</p> <a class="btn btn-lg btn-color" href="%7B%7B%20post.url%20%7D%7D">Take Action!</a> </div> </div> </div> </div> {% endfor %}{% tag "action_alert" with "homepage_alert" %}