Just updated my theme yesterday. I now have the Custom HTML section available. Thanks!
Topic summary
Adding anchor links to specific Shopify “sections” so nav or buttons scroll to a target on the same page. The OP initially looked at settings_data.json but was advised anchors don’t go in JSON; use a Custom HTML/Custom Liquid section instead.
Suggested method:
- Insert an element with an id (e.g., ) directly above the target section via a “Custom HTML/Custom Liquid” section, then link to #anchor_a from menus or buttons.
- Place and reorder sections in the Theme Customizer; “above the section” refers to the section order in the left sidebar. If the theme lacks such sections, anchors may need to be hard-coded.
Update: The OP on Turbo (Out of the Sandbox) updated their theme and gained a Custom HTML section, enabling the approach.
Open issues:
- Non-coders asked for step-by-step placement; guidance remained general.
- Dawn 2.0 users reported no Custom HTML option and that links like #Anchor_Name_here did not scroll to the inserted anchors. Attempts to add anchors via index.json and link from a “Shop Now” button also failed.
Status: No confirmed resolution for Dawn/index.json; an offer to collaborate was made.
Notes: JSON = data files for templates; Liquid = Shopify’s templating language; anchor link = URL fragment starting with #id.