Custom section not showing in the Shopify theme editor? Here's the fix
You uploaded the section, the file saved, and it isn't in the "Add section" list. Almost every case comes down to one of nine causes. Work through them in order.
Key takeaways
- A section with no
presetsin its schema never appears in "Add section". This is the cause most of the time. - The schema must be strict JSON: no trailing commas, no comments, no Liquid inside it.
enabled_onanddisabled_oncan hide a section from some templates or from the header and footer groups.- Check you are customising the theme you edited, then hard-refresh the editor before assuming the code is wrong.
You have written or downloaded a custom section, added it to your theme, and gone to the theme editor to place it. It isn't in the list. Shopify rarely explains why: the editor simply doesn't offer sections it can't use. The good news is that the causes are few and easy to check. Go through the checklist below in order; the early steps cover the most common problems.
The checklist
Check the schema has presets
The theme editor only lists sections that have a
presetsarray in their{% schema %}. Without it, the section is valid and can still be used in a template file, but it never appears under "Add section". Add at least one preset with aname:"presets": [{ "name": "Promo banner" }]. That name is what the merchant sees in the list.Validate the schema JSON
The content between
{% schema %}and{% endschema %}must be valid JSON. The usual culprits are a trailing comma after the last item in an array or object,// comments, single quotes instead of double quotes, and Liquid tags inside the schema (which aren't allowed). Shopify's code editor normally refuses to save an invalid schema and shows an error, but files pushed with the CLI or uploaded in a theme zip can fail more quietly. Paste the schema into the section schema generator or runshopify theme checkto find the line.Confirm the file is in the sections folder
The file must live in
sections/and end in.liquid, for examplesections/promo-banner.liquid. A file insnippets/is a snippet, not a section, and a name likepromo-banner.liquid.txtorpromo-banner.htmlis ignored. Also check there is exactly one{% schema %}tag in the file.Check enabled_on and disabled_on
These schema keys limit where a section can be added.
"enabled_on": { "templates": ["product"] }means the section only shows when you are editing a product template;"disabled_on": { "groups": ["header", "footer"] }keeps it out of the header and footer. If you are on the home page and the section is enabled only for products, it won't be listed. Older sections may use a top-leveltemplatesarray for the same purpose; it is the legacy form, and you shouldn't combine it withenabled_onordisabled_on.Add it in the right place: section groups vs templates
Online Store 2.0 themes have two areas. The header and footer are section groups, shared across every page; everything in between belongs to the template you are editing. Click "Add section" in the area you want. A section restricted to groups won't appear in a template's list, and the reverse is also true. A section rendered with the
{% section %}tag in a layout file is static: it shows in the editor only where it's rendered and can't be added from the list.Check you haven't hit a limit
Shopify currently allows up to 25 sections in a JSON template and up to 50 blocks per section. At the section limit the editor stops offering "Add section" for that template. Remove an unused section or move some content into blocks. A preset that asks for more blocks than its own
limitormax_blocksallows is invalid.Keep the section name short
The schema
nameand preset names should be short. Shopify caps the schemanameat 25 characters, and a longer one is rejected as an invalid schema. "Testimonials with star ratings and photos" won't work; "Testimonials" will.Make sure you are editing the right theme
Under Online Store > Themes, the code editor and the theme editor each belong to one theme. It is very easy to upload the file to a draft copy and then click Customize on the live theme, or the reverse. Open the code editor from the same theme's menu and confirm the file is there.
Hard-refresh the theme editor
The editor caches the list of sections. After adding or changing a file, reload the editor with a hard refresh (Cmd+Shift+R on Mac, Ctrl+Shift+R on Windows), or close and reopen it. If you are working through the Shopify CLI, make sure the push or
shopify theme devsync actually finished without errors.
Symptom, cause and fix
| Symptom | Likely cause | Fix |
|---|---|---|
| Section not in "Add section" anywhere | No presets in the schema | Add "presets": [{ "name": "…" }] |
| Code editor won't save the file | Invalid JSON, invalid default or too-long name | Fix the line the error names; remove trailing commas and comments |
| Listed on product pages, not the home page | enabled_on restricts templates | Add the template or remove the restriction |
| Missing from the header or footer | disabled_on excludes groups, or it's enabled only for templates | Allow the group, or add it in the template area instead |
| "Add section" is missing or greyed out | The template has reached Shopify's section limit | Remove an unused section or merge content into blocks |
| File uploaded but nothing changes | Edited a different theme, or the editor is cached | Check the theme, then hard-refresh |
| Section appears but blocks can't be added | max_blocks or a block limit reached, or no blocks defined | Raise the cap or add block types |
| Section added but empty or broken | Settings with no defaults, or a Liquid error | Add defaults; preview and read the error in the page |
A minimal schema that will appear
If you're unsure what's wrong, strip the schema back to something known to work, confirm the section appears, then add your settings back a few at a time. This is the smallest schema that shows up in the list on any template:
<div class="test-section">
<h2>{{ section.settings.heading | escape }}</h2>
</div>
{% schema %}
{
"name": "Test section",
"settings": [
{ "type": "text", "id": "heading", "label": "Heading", "default": "It works" }
],
"presets": [
{ "name": "Test section" }
]
}
{% endschema %}If even this doesn't appear, the problem isn't your code: it's the theme you are editing, a template that is full, or a cached editor.
If your theme is not Online Store 2.0
Older, "vintage" themes use .liquid templates rather than JSON templates, and only the home page lets you add sections freely. On other pages of a vintage theme there is no "Add section" button at all; a section has to be included in the template code. If your theme was installed years ago and has never been replaced, check the templates folder: files ending in .json mean Online Store 2.0, files ending in .liquid mean vintage.
Avoiding the problem next time
Most of these issues are schema mistakes that are easy to make by hand and easy to catch with a check. Validate every schema before uploading, keep names short, add presets from the start, and only use enabled_on when you really mean to restrict a section. The steps for installing a section cleanly are in how to add a custom section to Shopify, and the details of blocks and presets are in how to add blocks to a Shopify section.
Sections written by Klorr come with valid schema, presets and default blocks already in place, so they appear in "Add section" as soon as they are in the sections folder. If you would rather start from a finished section, the Klorr marketplace has ready-made ones to install.
Questions, answered
Why is my custom section not showing in the Shopify theme editor?
The most common reason is that the section's schema has no presets array; without it, Shopify won't list the section under Add section. Other causes are invalid JSON in the schema, the file not being in the sections folder, or enabled_on limiting it to other templates.
What are presets in a Shopify section?
Presets are default configurations defined in the section's schema. Each preset has a name, and can include default settings and blocks. A section needs at least one preset to appear in the theme editor's Add section list.
Why won't Shopify let me save my section file?
Shopify validates the schema when you save. Trailing commas, comments, an invalid default value, duplicate setting ids or a name that is too long all cause the save to fail. The error message usually names the problem.
How many sections can a Shopify template have?
Shopify currently allows up to 25 sections in a single JSON template, and up to 50 blocks per section. Once a template is full, the editor stops offering Add section for it.
Can I add custom sections to the header or footer in Shopify?
Yes, in Online Store 2.0 themes the header and footer are section groups and accept sections through Add section in that area. A section won't be offered there if its schema excludes groups with disabled_on, or limits it to templates with enabled_on.