Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Blog on the Crave Theme.
The number of blog posts to show on my 'Blog Post' section, is only 4 maximum (How can I change it, in source code doesn't allow me). If I add more posts, those ones will not be shown at all, even though the 'VIEW ALL' button was enabled. Every time you click the 'View all' button it doesn't load anything, it just probably refreshes the page that you're on and takes you back to it.
Is any way to increase that number 4?
Or to make the 'View All' button work?
Make a duplicate copy of your theme so you can preview your changes to ensure there are no mistakes.
Click on Edit Code for the duplicate copy you just added.
In the search bar on the top, left side of page type in - main-blog.liquid
Go to line #47. Look for the words - paginate.pages > 1 -%
Change the 1 to 12. Then click Save.
Next, go back to Customize Theme, Make sure it's the duplicate copy again.
Click on the Blog Post Heading and scroll down on the very left side of the page until you
see "Enable View All" for Blog Posts.
This will work for the Crave theme.
I did exactly what you advised, I was so so hoping it 's going to work, but unfortunately, still nothing shows up 😭....
Thanks so much for your reply, if you have any other ideas, I would be more than happy to try !!
What is your website and I will look at it
I am having this same exact issue! I have 5 blog posts and it only shows 4 on my blog page and when I click "view all" it just refreshes and I can't find my 5th post anywhere.
I have a similar issue: i have two blogs on my shopify webshop, one of which is dedicated to publications of our work, and the other is more general news.
I want to migrate our publication archives from our website into the webshop, and was planning on adding backdated blogposts to do so.
Currently i am up to 5 posts, and when i click 'view all', the link opens to my other blog (that has one post at this time).
Is there a way to change that?
(I am working with Dawn)
What I ended up having to do was just creating a second blog and keeping my newest four on the first one then the next four on the second one, then eventually the next four on a third one and so on. It’s pretty annoying because I have to reassign the oldest post to the next blog each time but at least for my site I hid the title and put each blog on one page and it looks like one cohesive page of blog posts that only have 4 in each row.
Hopefully a better fix comes to light.
Thank you!
To avoid confusion I disabled the 'view all' button, and instead created an archive with links to all blog posts.
It is not ideal, because it would be so much cooler to have a page with all the posts+images in one overview, but for now it is workable.
I do hope this get fixed!
Hi,
I have been having the same problem. I have finally figured out what is going on. I'll try to explain.
I'm using the Origin theme, but from the sounds of it it is also affecting the Dawn (an possibly other?) themes.
I think the confusion comes from there being two "Blog posts" sections available in the theme editor.
Go to the theme editor, then choose Blogs -> Default blog from the templates dropdown box in the top centre of the page.
In this template, there is a section called Blog posts. It can't be deleted, only hidden. This section relates to the main-blog.liquid code.
It is also possible to add a new Blog posts section by pressing the Add section button. This section, however, related to the feature-blog.liquid code.
At some point, I must have hidden the original proper main-blog section and added the featured-blog section because I prefer the look of it. It's very confusing that Shopify call these two different sections the same name.
If you want to be able to show all blog posts, you need to be using the original Blog posts section.
Alternatively, it's possible to edit the featured-blog.liquid file so it allows more blogs to be listed. Go to edit code, open the featured-blog.liquid file and look for this code (line 22 in the Origin theme)
{%- liquid
assign posts_displayed = section.settings.blog.articles_count
if section.settings.post_limit <= section.settings.blog.articles_count or section.settings.post_limit <= 4
assign posts_exceed_limit = true
assign posts_displayed = section.settings.post_limit
endif
-%}
Change the number 4 to a larger number. I chose 16.
Next, near the bottom of the file, look for the following around line 232
{
"type": "range",
"id": "post_limit",
"min": 2,
"max": 4,
"step": 1,
"default": 3,
"label": "t:sections.featured-blog.settings.post_limit.label"
},
Change the "max" number to the same number you changed above.
Whilst you're in that file, it might also be worth changing the name of the featured-blog section from "Blog posts" to "Featured blog posts" to avoid confusing in the theme editor. You can do that on line 191
{
"name": "t:sections.featured-blog.name",
"tag": "section",
"disabled_on": {
"groups": ["header", "footer"]
},
Change to "name": "Featured blog posts",
It will now appear like this in the theme editor
Hope this helps
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024