Face an issues with blog liquid code

Face an issues with blog liquid code

Azizul_islam
Shopify Partner
2 0 0

I created a custom layout for my shopify blog page. layout working fine as I want. but problems is when I click a blog card it open one specific link for all blog card. but it should be open each link for each card. Here is the code <div class="blog-posts">
{% paginate blog.articles by 10 %}
{% for article in blog.articles %}
<a href="{{ article.url }}" class="blog-article card">
{% if article.image %}
<div class="article-header">
<img src="{{ article.image | img_url: 'medium' }}" alt="{{ article.title }}">
<h3>{{ article.title }}</h3>
</div>
{% endif %}
<p>{{ article.published_at | date: '%B %d, %Y' }}</p>
<p>{{ article.content | strip_html | truncatewords: 20, '...' }}</p>
</a>
{% endfor %}
{% if paginate.pages > 1 %}
<div class="pagination">
{% if paginate.previous %}
<a href="{{ paginate.previous.url }}" class="btn">Previous</a>
{% endif %}
{% for part in paginate.parts %}
{% if part.is_link %}
<a href="{{ part.url }}" class="btn">{{ part.title }}</a>
{% else %}
<span class="btn active">{{ part.title }}</span>
{% endif %}
{% endfor %}
{% if paginate.next %}
<a href="{{ paginate.next.url }}" class="btn">Next</a>
{% endif %}
</div>
{% endif %}
{% endpaginate %}
</div>

Reply 1 (1)
Azizul_islam
Shopify Partner
2 0 0

Thank you for your effort but it did not work for me. in my store, you can click any blog but open only one blog