Collection description is not shown properly

ron952
Tourist
3 0 1

Hello, 

I customized the collection description to be seen like so: 

Screen Shot 2020-07-15 at 16.46.07.png

 

And the editor is look like:

 

 

<p style="text-align: center;"><span style="color: #e999e9;"><em><strong>PINK world can only be seen through PINK furniture</strong></em></span></p>
<p style="text-align: center;"><br>?בחורה של סטייל? שלא מוצאים בכל מקום? יש לך בבית שידה ורודה? כורסא? מזנון ורוד<br>.אם באת לענות בראש ״לא״ אז זה הזמן להתחדש ולהצדיק את המוניטין שבנית</p>

 

 

But in the website the collection description is shown not properly like so:

 

Screen Shot 2020-07-15 at 16.46.19.png

 

 

With no style and the new line break. 

my collection header is look like:

 

{% if collection.image and collectionImage %}
  <div class="collection-header">
    {%
      include 'rimg',
      img: collection.image,
      size: '1024x1024',
      lazy: true
    %}

    <div class="collection-details">
      <h1>{{ collection.title }}</h1>
      {% if collection.description != blank %}
        <div class="collection-description rte" style="direction: ltr;">
         {{ collection.description | strip_html | truncatewords: 700 }}
        </div>

        {% capture shortDescription %}{{ collection.description | strip_html | truncatewords: 700 }}{% endcapture %}
        {% if collection.description.size > shortDescription.size %}
          <script
            type="application/json"
            data-collection-json >
              {{ collection | json }}
          </script>
        {% endif %}
      {% endif %}
    </div>
  </div>
{% else %}
  <h1 class="page-title">{{ collection.title }}</h1>
  {% if collection.description != blank %}
    <div class="collection-description rte" style="direction: rtl;">
      {{ collection.description }}
    </div>
  {% endif %}
{% endif %}

 

 

My store url is: https://kualastyle.com/

 

Please help! 

0 Likes

You had used the stip_html filter in the collection description.
It will remove all HTML tags from the strings. 
Just remove it make it work the same as you design on the editor.
Visit this link for more help on the strip_html tag.

Founder of Shopify agency - Accomplishify.com
Contact me on: Michal.morek@accomplishify.com
0 Likes