Missing article tags

Highlighted
Tourist
7 0 1

We're building a custom theme using Slate and are having an issue with certain article tags not appearing in a loop.

We've got a loop pulling articles containing a particular tag, which itself is pulled from the section settings. This works for 4/6 iterations of the loop, but for some reason, not the other 2. We've done some troubleshooting and have found that those 2 tags aren't showing up in the list of article tags, even though there are most definitely posts containing them. We know this for sure, because for example, navigating to the actual tag page (e.g. "/blogs/handle/tagged/tag-name") shows those posts just fine. 

Here's the section code: 

<section class="sessions-categories">
  {% for block in section.blocks %}
    <div class="cat-block">
      <img class="mark" src="{{ 'brand-icon.png' | asset_url }}">

      <h1>{{ block.settings.cat-heading | escape }}</h1>
      <p class="lg">{{ block.settings.cat-subheading | escape }}</p>

      {% assign blog = blogs.design-sessions %}
      <div class="sessions-slider slick">
        {% for article in blog.articles %}
          {% if article.tags contains block.settings.cat-name %}
          <div class="slide">
            {% include 'article-preview' %}
          </div>
          {% endif %}
        {% endfor %}
      </div>
    </div>
  {% endfor %}
</section>

{% schema %}
  {
    "name": "Session Categories",
    "max_blocks": 6,
    "blocks": [
      {
        "type": "select",
        "name": "Add Category",
        "settings": [
          {
            "type": "text",
            "id": "cat-heading",
            "label": "Heading"
          },
          {
            "type": "textarea",
            "id": "cat-subheading",
            "label": "Subheading"
          },
          {
            "type": "text",
            "id": "cat-name",
            "label": "Category Name"
          }
        ]
      }
    ]
  }
{% endschema %}
1 Like
Highlighted
Shopify Partner
6038 887 2038

Hello, @janineisabelle 

Thanks for post.

can you please try this 

https://shopify.dev/docs/themes/liquid/reference/objects/article

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
Highlighted
Tourist
7 0 1

@KetanKumar wrote:

Hello, @janineisabelle 

Thanks for post.

can you please try this 

https://shopify.dev/docs/themes/liquid/reference/objects/article


Sorry, try what exactly? All you've done is linked to the general documentation on the article object. There's nothing in there that specifically addresses the issue I've described.

0 Likes
Highlighted
Shopify Partner
6038 887 2038

@janineisabelle 

Thanks

can please check your original theme code?

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
Highlighted
Tourist
7 0 1

@KetanKumar wrote:

@janineisabelle 

Thanks

can please check your original theme code?


Again, I'm not sure what you're asking. Do you want us to send you a collaborator request so you can look at our theme? 

0 Likes
Highlighted
Shopify Partner
6038 887 2038

@janineisabelle 

Yes, please go head

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
Highlighted
Tourist
7 0 1

@KetanKumar wrote:

@janineisabelle 

Yes, please go head


Sorry, only just saw your reply! Sending the request shortly, thanks.

0 Likes
Highlighted
Tourist
7 0 1

@KetanKumar Hi, I sent you a message about this. Please check your inbox!

0 Likes
Highlighted
Tourist
7 0 1

Still waiting for a solution to this! If there's someone else available to help, please let me know! We are very anxious to resolve this for our client.

0 Likes
Highlighted
Shopify Partner
1364 185 436

How many blog posts does your client have? There's a limit of 50 on a forloop - if these posts are further than 50 posts back that could be the reason they are not showing up.

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes