Hello All!
I am trying to show all blogs on a page. Does the code below no longer work for doing this?
{% for blog in blogs %}
Blog: {{ blog.title }}
{% endfor %}
I have it working using the below code, however using this method will require updating the “cats” variable anytime a new blog is added, which is not ideal.
{% assign cats = "blogExmp1,blogExmp2,blogExmp3,blogExmp4" | split: ',' %}
{% for cat in cats %}
- {{ blogs[cat].title | escape }}
{% endfor %}
I suppose setting the variable as a section setting would allow for adding the new blog from the customizer but still not the most ideal solution.
Thanks!