Shopify themes, liquid, logos, and UX
So I need to hide the collection description (not the title) in my collection pages. I know I can leave the description blank in Shopify, but I wanted to see if it is possible to hide because I'm using an automated SEO app that uses the description as SEO tags. Thanks!
Solved! Go to the solution
This is an accepted solution.
@Jose13 wrote:Hi! Thanks for the reply. I can't find the collection.description line neither in collection.liquid (section file) nor collection.liquid (template file). The only place I can find it is in collectio-template.liquid but it is inside an IF statement:
{% if collection.description != blank %} <div class="rte collection-description page-width"> {{ collection.description }} </div> {% endif %} {% else %} <div class="page-width"> <div class="section-header text-center"> <h1>{{ collection.title }}</h1> {% if collection.description != blank %} <div class="rte"> {{ collection.description }} </div> {% endif %}Maybe it's here that I have to make the changes? Or maybe I can code in the theme.css.liquid file?
If you don't need the collection.description then you can comment it out like below. Although I recommend refactoring the block so you don't have unnecessary conditions (if/else) and just render the collection.titles.
{% if collection.description != blank %} <div class="rte collection-description page-width">
{% comment %} {{ collection.description }}
{% endcomment %} </div> {% endif %} {% else %} <div class="page-width"> <div class="section-header text-center"> <h1>{{ collection.title }}</h1> {% comment %} {% if collection.description != blank %} <div class="rte"> {{ collection.description }} </div> {% endif %} {% endcomment %}
You can hide it by going into your collection.liquid, ctrl + f for {{ collection.description }} -- And comment it out:
{% comment %} {{ collection.description }} {% endcomment %}
If you open collection.liquid and see something like:
{% section 'collection-template' %} //or {% include 'collection-template' %}
You will want to find those files and search for collection.description and do what I mentioned earlier. If you see "section" it's a section file, if you see "include" it's a Snippet file.
Hi! Thanks for the reply. I can't find the collection.description line neither in collection.liquid (section file) nor collection.liquid (template file). The only place I can find it is in collectio-template.liquid but it is inside an IF statement:
{% if collection.description != blank %} <div class="rte collection-description page-width"> {{ collection.description }} </div> {% endif %} {% else %} <div class="page-width"> <div class="section-header text-center"> <h1>{{ collection.title }}</h1> {% if collection.description != blank %} <div class="rte"> {{ collection.description }} </div> {% endif %}
Maybe it's here that I have to make the changes? Or maybe I can code in the theme.css.liquid file?
This is an accepted solution.
@Jose13 wrote:Hi! Thanks for the reply. I can't find the collection.description line neither in collection.liquid (section file) nor collection.liquid (template file). The only place I can find it is in collectio-template.liquid but it is inside an IF statement:
{% if collection.description != blank %} <div class="rte collection-description page-width"> {{ collection.description }} </div> {% endif %} {% else %} <div class="page-width"> <div class="section-header text-center"> <h1>{{ collection.title }}</h1> {% if collection.description != blank %} <div class="rte"> {{ collection.description }} </div> {% endif %}Maybe it's here that I have to make the changes? Or maybe I can code in the theme.css.liquid file?
If you don't need the collection.description then you can comment it out like below. Although I recommend refactoring the block so you don't have unnecessary conditions (if/else) and just render the collection.titles.
{% if collection.description != blank %} <div class="rte collection-description page-width">
{% comment %} {{ collection.description }}
{% endcomment %} </div> {% endif %} {% else %} <div class="page-width"> <div class="section-header text-center"> <h1>{{ collection.title }}</h1> {% comment %} {% if collection.description != blank %} <div class="rte"> {{ collection.description }} </div> {% endif %} {% endcomment %}
Yup, that's probably where you're going to want to edit. All that if statement is saying is that "If there is a collection description, show it". So you can just comment that out like @cnvs said.
Hi does anyone know how to hide part of a product description on shopify by adding a scroll feature.
Example Product Description:
----------------------------
If I want the features section to only be seen if somebody scrolls down how do i do that? I.e I dont want it to be seen as soon as somebody clicks the product description, I want it to essentially be hidden unless the user scrolls down.
Thanks!
This Worked For Me! Thank You!
User | RANK |
---|---|
147 | |
103 | |
90 | |
55 | |
52 |
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By