How do i create a custom section and display <p>Hello, World!</p> in it

{% if section.settings.enable %}
    <p> Hello, World! </p>
{% endif %}

{% schema %}
{
    "name": "Hello World",
    "settings": [
        {
            "type": "checkbox",
            "id": "enable",
            "label": "enable p",
            "default": false
        }
    ]
}
{% endschema %}

heres my sections/hello-world.liquid. how do i display it in my store.

Section files must define presets in their schema to support being added to JSON templates using the theme editor. Section files without presets should be included in the JSON file manually, and can’t be removed using the theme editor.

https://shopify.dev/docs/themes/architecture/sections/integrate-sections-with-the-theme-editor#:~:text=Section%20files%20must%20define%20presets,removed%20using%20the%20theme%20editor.

hey, thanks for the reply, are there any resource to learn about this with code examples or better documentation?

Shopify documentation is pretty reasonable. Plus their free themes are (were) a good example.

You can google a lot of tutorials.

1 Like

:skull: