I used this code to dynamically list 5 most recent blogs. It includes an image and title of the blog - both are linked (and it works great):
<div class="dynamic-blog-item">{% set posts = blog_recent_posts('default', 5) %} {% for post in posts %} <div class="dynamic-blog-content"> <div class="dynamic-blog-image"><a href="{{ post.absolute_url }}"><img src="{{ post.featured_image }}" alt="{{ post.name }}"></a></div> <div class="dynamic-blog-title"> <h3><a href="{{ post.absolute_url }}">{{ post.name }}</a></h3> </div> </div> {% endfor %}
</div>
I would like to use the same structure above, but this time dynamically list the most recent blog by one specific topic (tag).
I believe you can use: blog_recent_tag_posts -- but I was not able to make it work. Any help is greatly appreciated - I am not a developer so please explain in detail. Thanks.
Just remember to replace the string 'my_tag_name' for your tag-slug (notice that tag-slug is not the same as tag name, for example a tag that has "my tag" as name will have "my-tag" as slug).
Just remember to replace the string 'my_tag_name' for your tag-slug (notice that tag-slug is not the same as tag name, for example a tag that has "my tag" as name will have "my-tag" as slug).