Re: Blog posts - why does this only show recent blog posts and not ALL?

Blog posts - why does this only show recent blog posts and not ALL?

peeduh
Visitor
3 0 0

I have page template code below that shows all blog posts matching a specific tag.


But it's only outputting recent articles (only 2 matching) when it should be showing ALL articles (more than 10+).

 

Anyone know what I'm doing wrong? Thank you.

 

 

<div class="page-width">
  <div class="grid">
    <div class="grid__item medium-up--five-sixths medium-up--push-one-twelfth">
      <div class="section-header text-center">
        <h1>{{ page.title }}</h1>
      </div>

      <div class="rte">
        {{ page.content }}


{% for article in blogs.news.articles %} 
{% if article.tags contains 'exercise' or article.tags contains 'fitness' %} 

       
        <div class="njohn_search_otherpage"> 
  <!---<div>{{ article.image.src | img_url: 'medium' | img_tag: article.title }}</div> --->
          <div class="list-view-item__link">
                                 <div class="list-view-item__image-column">
                    <div class="list-view-item__image-wrapper product-card__image-wrapper">
                      <center><img class="list-view-item__image" src="{{ article.image.src | img_url: '600x600' }}" alt="{{ article.image.alt | escape }}"></center>
                    </div>
                  </div>

 
            
  <div><b><a href="{{ article.url }}" title="{{ article.title | escape }}"> {{ article.title }}</div></a></b>
    
  
                {{ article.content | strip_html | truncatewords: 50 }}
  
  </div><br>

 {% endif %} 
 {% endfor %}
        
      </div>
    </div>
  </div>
</div>

 

 

Replies 3 (3)

GemPages
Shopify Partner
5625 1262 1287

Hello @peeduh,

 

I'm so glad to support you today 😁.

 

To can show blog posts should take into account the following factors:

1. On the right sidebar of the Blog Post choose Visibility:

 

GemPages_1-1669791084008.png

 

2. At your individual blog posts, you should use "Organization > Blog" on right side bar to assign the blog posts to the same blog.

 

Eg:

GemPages_3-1669791287651.png

 

3. In your code above, the blog posts should have tags as fitness or exercise.

 

Eg:

GemPages_4-1669791382226.png

 

I hope you find the answer helpful.

 

Kind & Best regards,
GemPages Support Team.

GemPages - Build any high-converting store pages for any business


- If you find my reply helpful, please hit Like and Mark as Solution
- Get connected: App Store | Blog | Community | Help Center
emailchelsea
Tourist
5 0 3

I have done this, but only 3 posts show. I now have 4. Before uploading this newest one, my first post was visible. Now it's not showing. When I select view all, it does nothing additional. No more than 3 posts show. 

BlaineFord
Tourist
5 0 2

I am having this same issue. I have 5 blog posts in one blog but when I click "view all" button only  the 4 show up that are in the preview. And what's really weird is one of them that's showing up is published after the one that isn't viewing? Not sure what to do to get that post to show up!