Blog Category's article_excerpt issue for meta property it's taking whole blog content

Vaibhavi_Gabani
Shopify Partner
16 0 0

I Have created two more category of blog. I Update Diffrent blog page for both category and same as for article. my meta property is as  : 

 

{% if template.name == 'product' %}
{% assign variant = product.selected_variant %}
{% assign og_image = variant.featured_media.preview_image | default: product.featured_media.preview_image %}
{% elsif template.name == 'collection' %}
{% assign og_image = collection.image %}
{% elsif template.name == 'article' %}
{% if article.image %}
{% assign og_image = article.image %}
{% endif %}
{% endif %}

 

 

Where my blog-post is working properly in meta tag.  bt for other two category takes complete blog in meta property tag.  article_excerpt is not working may be.

 

 

Replies 2 (2)

Vaibhavi_Gabani
Shopify Partner
16 0 0

<meta property="og:description" content="{{ og_description | escape }}">

 

Vaibhavi_Gabani
Shopify Partner
16 0 0

{% if template.name == 'product' %}
{% assign variant = product.selected_variant %}
{% assign og_title = product.title | append: variant.title | strip_html %}
{% elsif template.name == 'article' %}
{% assign og_title = article.title | strip_html %}
{% assign og_type = 'article' %}
{% assign og_description = article.excerpt_or_content | strip_html %}
{% elsif template.name == 'password' %}
{% assign og_title = shop.name %}
{% assign og_url = shop.url %}
{% assign og_description = shop.description | default: shop.name %}
{% endif %}