Requirement:
On the search page, we want to change how the item description appears. We want the search results to show the contents of the Meta Description instead of the Description. In the Product page, Meta Description will only show if you click the Edit website SEO link below, at the Search engine listing preview section.
What I checked:
- In our search liquid template, the items are printed under this loop:
{% for item in search.results %}
- The item description is printed as such:
{{ item.content | strip_html | truncatewords: 30 }}
-
In product object in Shopify.dev, there is no direct reference to Meta Description field. I’m also aware of the metafield object also included in the product object but it is different since Meta Description is a standard field in Shopify products, we did not create that.
-
I know about the page_description object, but it is not applicable to the search liquid template. Unless there is a way to open the item as a page within the loop and get the page_description?
-
Found this thread in this forum, but the solution is not applicable on my end.
Any suggestions on how to implement our requirement? Thank you.
