Problem: The homepage cannot accept sections because no template appears assigned, while collection pages work. An index.json exists but is effectively empty. theme.liquid uses the standard {{ content_for_layout }}. Two screenshots compare the editor state with and without an index.json template, which is central to understanding the issue.
Suggested fix (step-by-step):
In Online Store > Themes > Customize, check if Add section shows options for the homepage; if not, it may be a template issue.
In Actions > Edit code, ensure a templates/index.liquid file exists. If missing, create it.
Inside index.liquid, include the desired sections, for example:
{% section ‘featured-collection’ %}
{% section ‘image-with-text’ %}
{% section ‘product-list’ %}
Save and return to the editor; sections should be available to add.
Outcome: One participant confirmed these steps solved a similar problem.
Open point/best practice question: The author asks whether index.json needs a default “main” section (analogous to collection templates using {“main”: “main-collection”}), noting index.json typically defines only sections and their order, with generated IDs. Guidance on whether a default section is required and best practices for homepage template structure remains unanswered. The thread is not fully resolved.
Hi I’m creating a new theme for a customer. And for some reason I can’t add sections to home page. There is no template assigned. If I go to collection page there is not issue at all, I can add all the sections available. If I look at my templates in Edit code there is an index.json that is an empty json object with sections and order as it should be since I can’t add anything. And in my theme.liquid I use the standard {{ content_for_layout }} between main tag. Have anyone else encountered the same issue?
In your Shopify admin panel, go to “Online Store” > “Themes” and click on “Customize” for the theme you’re working on.
Click on “Add section” and see if any sections are available to add to the homepage. If there are no sections available, then the issue may be related to the homepage template.
Go back to the main “Themes” screen and click on “Actions” > “Edit code” for the theme you’re working on.
In the file list, look for a file named “templates/index.liquid”. This is the template that should be assigned to the homepage. If this file is missing, then you will need to create it.
Open the “index.liquid” file and add the necessary code to render the sections. The code should look something like this:
In this example, the code is calling three sections: “featured-collection”, “image-with-text”, and “product-list”. Replace these with the section names that you want to include on your homepage.
Save the “index.liquid” file and go back to the theme editor. You should now see the sections available to add to your homepage.
Thanks for the answer. So does this mean that index.json needs a default section like other templates, i.e. collection ({ main: main-collection})? Index doesn’t seem have that, only sections and order. And other sections should get a generated ID. I get that you can remove the “hard-coded” section afterwards. But I would like to know what the best practice is.