Before you start
When a developer is connecting an existing compatible collection metafield to a custom theme or template.
- Custom integration does not edit theme files.
- Use the exact namespace, key and field type configured for this store.
- Duplicate the live theme before changing Liquid and test each relevant collection template.
Steps to follow
- Confirm the selected field in Collection SEO. Open this guide from setup to retain its configured namespace and key when provided.
- Duplicate the live theme and work on the duplicate first.
- For a compatible rich-text metafield, render the field with metafield_tag in a snippet or collection section. The code section in this guide uses validated identifiers when available.
- Place the snippet or section in the actual template assigned to the collection, such as after its product grid.
- Preview a collection with published content. Test an empty field too, check mobile layout and prevent duplicate rendering before publishing the theme.
For example
A custom template can render a rich-text SEO field after its product grid while another collection template uses the Rankora app block.
Developer code examples
These examples use placeholders. Replace YOUR_NAMESPACE and YOUR_KEY with the exact configured collection field before use. Open this guide from Collection SEO setup to retain valid identifiers when provided.
These examples are for a compatible rich-text collection metafield. Duplicate the live theme first. Choose one placement method, not both.
Option A: create snippets/rankora-collection-seo.liquid
{% assign rankora_seo_content = collection.metafields['YOUR_NAMESPACE']['YOUR_KEY'] %}
{% if rankora_seo_content != blank %}
<section class="rankora-collection-seo">
{{ rankora_seo_content | metafield_tag }}
</section>
{% endif %}Insert the following line in the collection section at the desired position, for example after the product grid. Your theme may use a different section file.
Render the snippet in your collection section
{% render 'rankora-collection-seo' %}Option B: create sections/rankora-collection-seo.liquid
{% assign rankora_seo_content = collection.metafields['YOUR_NAMESPACE']['YOUR_KEY'] %}
{% if rankora_seo_content != blank %}
<section class="rankora-collection-seo">
{{ rankora_seo_content | metafield_tag }}
</section>
{% endif %}
{% schema %}
{
"name": "Rankora collection SEO",
"enabled_on": { "templates": ["collection"] },
"settings": [],
"presets": [{ "name": "Rankora collection SEO" }]
}
{% endschema %}For Option B, add the section to the collection template using Theme Editor where supported, or its collection JSON template. Preview populated and empty fields on each assigned template.
What happens next
Selecting a custom integration tells Rankora where to save content. Your theme code determines where and how that content appears.
A useful tip. A merchant who does not edit Liquid should use Automatic integration or ask their theme developer for this step.
Take care. Do not paste a guessed namespace, add the same content twice or edit the live theme without a recoverable copy.
Common questions
Is the example ready for every theme?
No. File names, template structure and the field identifier can vary. Use the configured field and adapt placement to the actual theme.
Can I put the content below the products?
Yes, when the chosen collection section or template supports that placement. Verify it in the theme preview.
Does changing the integration move existing text?
Do not assume it migrates old field values or theme code. Verify the destination and published content after any change.
If you are still stuck
- Check the exact field identifier, populated value, assigned template and any theme conditions that hide the section.
- If a different namespace or unsupported field type is selected, stop and confirm the integration rather than forcing the sample code.