Hi all,
I am trying to display our blog posts on a page. The number of blog posts can be set in the theme customizer. This part works well. But then I would like to add a “View all” button that loads the rest of the blogposts we have - all of them - on the same page.
Right now, the “View all” button redirects me to a new page with blogposts.
Show More
{%- for tag in article.tags -%}- {{ tag }}{%- endfor -%}{%- endif -%}- Read more
{%- if blog.comments_enabled? and article.comments_count > 0 -%}- {{ article.comments_count }} comments {%- endif -%}{%- endfor -%}
{%- endif -%} {%- if section.settings.show_view_all -%} VIEW ALL {%- endif -%} {% schema %} { "name": "Blog posts", "class": "index-section", "settings": [ { "type": "text", "id": "title", "label": "Heading", "default": "Blog posts" }, { "id": "blog", "type": "blog", "label": "Blog" }, { "type": "range", "id": "post_limit", "label": "Posts", "min": 3, "max": 12, "step": 1, "default": 3 }, { "type": "checkbox", "id": "blog_show_author", "label": "Show author", "default": false }, { "type": "checkbox", "id": "blog_show_date", "label": "Show date", "default": true }, { "type": "checkbox", "id": "show_view_all", "label": "Show 'View all' button", "default": false } ], "presets": [ { "name": "Blog posts", "category": "Blog", "settings": { "blog": "News", "post_limit": 3 } } ] } {% endschema %} ```
Can anyone help?
Thank you!