View All Button for blog posts doesn't work at all. Please HELP !!

View All Button for blog posts doesn't work at all. Please HELP !!

nadylina
Tourist
6 0 2

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?

Replies 8 (8)

Lyndajh
Excursionist
21 1 3

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. 

 

nadylina
Tourist
6 0 2

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 !!

Lyndajh
Excursionist
21 1 3

What is your website and I will look at it 

BlaineFord
Tourist
5 0 2

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. 

HouseofThol
Visitor
2 0 1

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)

Let's make green living easier
BlaineFord
Tourist
5 0 2

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. 

HouseofThol
Visitor
2 0 1

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! 

 

Let's make green living easier
stuartmayor
Visitor
1 0 1

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.

 

stuartmayor_2-1726492842280.png

 

 

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

stuartmayor_0-1726492552320.png

 

 

Hope this helps