Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Blog all posts page putting articles within <strong> and <em> elements?

Blog all posts page putting articles within <strong> and <em> elements?

Jon_Innovonics
Shopify Partner
24 3 10

Hello,

I am working on the blog template and created a for loop where the articles are rendered.

If I look at the "all" blog, the first article is rendered properly, but all other articles in the loop are rendered with surround <strong><em> elements causing the style to break. These elements are not coming from the theme.

 

If I go to a tagged page (blogs/all/tagged/random) the page renders properly and there is no <strong><em> elements

 

Here is the blog template being rendered:

 

 

 

 

<div class="section-{{- section.settings.section_style -}}">
  {%- paginate blog.articles by 6 -%}
    <div class="px-4 tablet:px-20 py-8 page-width mx-auto">
      <h1>{{ blog.title | escape }}</h1>
      <div class="grid grid-cols-1 desktop:grid-cols-2 gap-x-4 gap-y-12">
        {%- for article in blog.articles -%}
          {% assign odd_index = forloop.index | modulo: 3 %}
          <div
            class="col-span-1 h-auto object-contain {% if forloop.first == true or odd_index == 1 %} tablet:col-span-2 tablet:text-center {% endif %} "
          >
            {% render 'article-card-new',
              article: article,
              show_image: section.settings.show_image,
              show_date: section.settings.show_date,
              show_author: section.settings.show_author,
              show_excerpt: true,
              odd_index: odd_index,
              forloop: forloop
            %}
          </div>
        {%- endfor -%}
      </div>

      {%- if paginate.pages > 1 -%}
        {%- render 'pagination', paginate: paginate -%}
      {%- endif -%}
    </div>
  {%- endpaginate -%}
</div>

 

I've never come across this issue, and even loading the same page in Dawn theme loads fine, both all page and tagged page

 

 

️ If I was helpful, please Like or Accept the solution


Contact me directly via email: Jonathan@Innovonics.com


 

Replies 0 (0)