Creating a private block for a section is not returning anything

Hi,

Me and my team are recreating our theme from scratch using Shopify Skeleton Theme. I’m creating a header announcement bar and I am having issues with private blocks in section. I’m referring to this doc and this quick start but I still can’t get it to work.

I refer to the latest Horizon theme and they have a bunch of custom private blocks that work with their theme and works in the preview page.

Here is my code if anyone curious,

~/blocks/_announcement_content.liquid

{% schema  %}
  {
    "name": "Announcement Content",
    "tag":null,
    "settings": [
      {
        "type": "inline_richtext",
        "id": "announcement_text",
        "label": "Announcment Text"
      }
    ],
    "presets": [
      {
        "name": "Announcement Content",
        "settings": {
          "announcement_text": ""
        },
        "blocks": []
      }
    ]
  }
{% endschema %}

~/sections/header-announcements.liquid

{% schema %}
{
  "name": "Header Announcements",
  "blocks": [
    {
      "type": "_announcement_content"
    }
  ],
  "enabled_on": {
    "groups": ["header"]
  },
  "settings": [
    {
      "type": "range",
      "id": "speed",
      "label": "Rotating Speed",
      "min": 2,
      "max": 10,
      "default": 5,
      "unit": "sec"
    },
    {
      "type": "header",
      "content": "Appearance"
    },
    {
      "type": "select",
      "id": "section_width",
      "label": "Section width",
      "options": [
        {
          "value": "page-width",
          "label": "Page Width"
        },
        {
          "value": "full-width",
          "label": "Screen Width"
        }
      ],
      "default": "full-width"
    },
    {
      "type": "color",
      "id": "background_colour",
      "label": "Background Colour",
      "default": "#000000"
    },
    {
      "type": "color",
      "id": "text_color",
      "label": "Text Color",
      "default": "#ffffff"
    },
    {
      "type": "range",
      "id": "border_size",
      "label": "Border Size",
      "min": 0,
      "max": 5,
      "step": 0.5,
      "unit": "px",
      "default": 0
    },
    {
      "type": "header",
      "content": "Content Padding"
    },
    {
      "type": "range",
      "id": "padding_block_start",
      "label": "Content Top Padding",
      "min": 0,
      "max": 100,
      "step": 1,
      "unit": "px",
      "default": 15
    },
    {
      "type": "range",
      "id": "padding_block_end",
      "label": "Content Bottom Padding",
      "min": 0,
      "max": 100,
      "step": 1,
      "unit": "px",
      "default": 15
    }
  ],
  "presets": [
    {
      "name": "Header Announcements",
      "blocks": {
        "announcement_1": {
          "type": "_announcement_content",
          "settings": {
            "announcement_text": ""
          }
        }
      },
      "block_order": ["announcement_1"]
    }
  ]
}
{% endschema %}

When I added it manually to the header-announcement section, when console logged, it return as type: \@theme, settings: {} in the the front-end, eventhough I poppulated the announcement-text with a string.

What am I missing from this code that It don’t work?

Thank you sir. I need more help about this codding
For example,


I wanna Remove this Header section beige Background too. I wanna make this horse etc.. image (as you can see) as background in header section too

On quick glance nothing pop’s out as wrong.

When in doubt take a known working theme then gut EVERYTHING to the bare minimum that works.
Then start renaming things to match the wanted outcome structure till it either: A) breaks or B) is working then copy to target theme.

Thanks @PaulNewton for taking the time for responding and providing some suggestion. We tried to bare minimize Horizon theme to our spec but it’s taking too much time and the technicality that they implement is above ours :frowning:

I’m gonna move forward and use public section blocks for now until someone or something figure this out.

Thanks again.