Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Like product, I can show all product by doing Navigation > Add menu item > All collections
But I can't do >all categories for blogs, is there way to show all of the blogs in one page?
Thank you so much for your help.
You will need to code it.
Note: Here blog1 and blog2 and blog3 are your blog handles. Go to your respective blog pages and copy the part after the last '/'. Like:
{% assign blog_handles = "blog1,blog2,blog3" | split: "," %}
{% for handle in blog_handles %}
{% for article in blogs[handle].articles %}
<h2><a href="{{ article.url }}">{{ article.title }}</a></h2>
{% endfor %}
{% endfor %}
Go view the page you just created. It will display your article's heading and clicking them will take you to the articles. (Article is alias for blog posts in Shopify). Read more article object properties here: https://shopify.dev/docs/themes/liquid/reference/objects/article
Thank you! It works but all the template is lost & no blog pic is showing, is there anyway to keep the template while showing all the blogs? @oscprofessional
Try this
Step 1: Create the special "Blogs" linked-list:
Step 2: Edit your custom page template
{% for link in linklists.blogs.links %}
{% assign blog = link.object %}
{% for article in blog.articles %}
<h2><a href="{{ article.url }}">{{ article.title }}</a></h2>
{% endfor %}
{% endfor %}
Let me know if this solves your problem or if you need further help!
Hello! I followed your step 1 which worked and then had the same issue of no photos showing in the all blogs listing (https://oneconsciousearth.shop/pages/all-knowledge)
Attempted step 2 and it hasn't changed anything.
Is there another way or maybe more detailed instructions for step 2 (to make sure I am getting it right)?
How do you do this in Dawn theme with json template?
Hello @oscprofessional, thank you for the above solution which is working. Also could you please add a code on how we can implement the pagination and order of displaying the post based on the date for the above solution?
Thank you
Hey, this looks like it might work for what I want to do, but what about pagination? I can't have the page load 400+ items...
Hello, I am using 'Taste' theme and unfortunately this solution does not work for that anymore. I have looked through the code and I cannot find {{ page.content }} anywhere in that code when a new template is created. Do you know something may have changed in the shopify templates over the last couple years? I am creating a store now and want to show all blog posts on the same page for customers to browse but unfortunately, I am unable to do so. Can you help please? Thanks!
That's also my question. Thank you
Here's one simple way:
Create a new page template by going to Online Store > Themes > Customize, then select Pages from the top drop-down menu and 'Create Template'. In the new template, simply add a section after the page content called 'Blog posts', then select a category.
Next, add another section below this and select a different category. Repeat this until you have three (or four) blog posts displayed per blog category with a 'View all' button so users can explore all posts from any category.
Hope this helps someone!
This is the solution I needed! Easy to understand and implement. Thank you for sharing.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024