Liquid, JavaScript, themes, sales channels
Hello Shopifiers,
I would like to add a box of content (or coded content) to individual category pages below the products. I can add code to each individual page, or if there is way to add in a text box that would be amazing...
Thank you in advance!
DK
Hi,
share your store url on which page you want to add description ?
Morning OSC!
We ideally I would like to add to all, or most, category pages. But let's start here: tinyurl.com/65v5ymc3
Thank you in advance!
Hi @DK2 ,
is this one of the pages you want to add content?
And the content should be underneath the products at the end of a page that might be scrolled?
Regards
Thomas
Yes Thomas! Right under products.
Hi @DK2 ,
I noticed that you use your own theme "STABLE AGM Main Theme" so it is difficult to give you advice without seeing the details. Basically variations of the following should work. In your file template-collection.liquid just add something like
<div class="rte">
{{ collection.metafield.content }}
</div>
That is the easy part. But you should make a backup of your theme. The 'rte' allows you to have a description in the same way as you have it in most themes on the product page.
More difficult is how to add the additional information - the metafield - to the collection, because this is not possible directly in the Shopify admin. You either need an app for that or you have to use the Shopify admin api, see https://shopify.dev/docs/admin-api/rest/reference/metafield and https://shopify.dev/docs/themes/liquid/reference/objects/metafield.
Regards
Thomas
Thank you for the response, but I am still confused a little. If I use a single div to call in the meta field, wont that be the same content on all category pages? Is there a way to identify the content on an individual page IE food content, clothing content, etc...
Also, if the metafield apps can serve the content, why cant I serve it directly?
Hi @DK2 ,
the content of the metafield is connected to each collection, i.e. it does exactly what you expect, delivering the content specific for each category.
Also, if the metafield apps can serve the content, why cant I serve it directly?
You need the app to setup the metafields if you do not want to use the Shopify API directly, the serving/rendering is then done by Shopify.
Regards
Thomas
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024