Removing Blog Tags from Debut Theme

Solved

Hi there!

I'm trying to remove my blog tags from the debut theme and can't seem to get it to work. I've searched the forums and tried a few options, but I can't seem to get rid of them. My real issue is that, I tagged my latest blog post with "exclude-from-email" which I was assuming would also be a hidden tag, and it's not. *womp womp* So, I guess I need to remove them all now..

One of the options was this, but it didn't work for me:

blog-template.liquid  (Lines 78-88)

{% if article.tags.size > 0 %} <li class="list--inline__separator"> {% for tag in article.tags %} <a href="{{ blog.url }}/tagged/{{ tag | handle }}">{{ tag }}</a>{% unless forloop.last %}, {% endunless %} {% endfor %} </li> {% endif %} (this didn't copy the way I pasted it!)

 If you have any suggestions, I would greatly appreciate it!

Thanks! - Kel

0 Likes
g33kgirl
Shopify Partner
321 95 113

This is an accepted solution.

Hi @KelMurphy, you need to comment out blog-template line 165-172. Wrap the div with the comment tag:

 

{% comment %}
     {% if article.tags.size > 0 %}
            <div class="article__tags article__tags--list rte">
               {{ 'blogs.article.posted_in' | t }}
               {% for tag in article.tags %}
               <a href="{{ blog.url }}/tagged/{{ tag | handle }}">{{ tag }}</a>{% unless forloop.last %}, {% endunless %}
                {% endfor %}
           </div>
    {% endif %}
 {% endcomment %}

 

If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl ☕
If you're not comfortable with code, please modify code files at your own risk.

@g33kgirl YESSS! Thank you SO much! This worked perfectly!

0 Likes
g33kgirl
Shopify Partner
321 95 113

This is an accepted solution.

@KelMurphy If you want to exclude specific tags but show other tags, then rather than commenting out the code, you can exclude them from the loop using "exclude-" tag. So this code will show other tags, but not tags which contain the word 'exclude' eg. 'exclude-from-blog' or 'exclude-from-mail':

 {% if article.tags.size > 0 %}
          <div class="article__tags article__tags--list rte">
              {{ 'blogs.article.posted_in' | t }}
                  {% for tag in article.tags %}
                    {% unless tag contains 'exclude-' %}
                      <a href="{{ blog.url }}/tagged/{{ tag | handle }}">{{ tag }}</a>{% unless forloop.last %}, {% endunless %}
                   {% endunless %}
             {% endfor %}
         </div>
{% endif %}

 

If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl ☕
If you're not comfortable with code, please modify code files at your own risk.
g33kgirl
Shopify Partner
321 95 113

Glad I could help!

If you found my answer helpful, please LIKE and ACCEPT.
buymeacoffee.com/g33kgirl ☕
If you're not comfortable with code, please modify code files at your own risk.

@g33kgirl  This is even better!!! Thanks so much! 

0 Likes