replace {{ routes.root_url }}
Topic summary
Goal: make the store logo click scroll to the top instead of navigating to the homepage.
What was tried:
- Advised to edit header.liquid and change the logo link. The current logo anchor uses Shopify’s Liquid variable {{ routes.root_url }} which points to the homepage.
- Suggested replacing the href value with an in-page anchor targeting the top section (example provided: #shopify-section-sections–20420475158844__announcement-bar).
- Guidance given to search for <a href=“{{ routes.root_url }}” …> and replace the value inside the quotes with the anchor wherever it appears.
Where to change it:
- In the header.liquid code snippet, the relevant line is the logo link: . Replace {{ routes.root_url }} with the anchor.
Current status/outcome:
- After replacing both occurrences, one participant reports the logo still goes to the homepage, suggesting the anchor may be incorrect or not applied to the right instance. No confirmed fix yet; discussion remains open.
Notes:
- The posted code snippet is central to understanding where to edit. Explanation: {{ routes.root_url }} = homepage URL.