Skip to product information
1 of 1
Published:2024.05.27

[Dawn] An example of how to insert custom liquid code into the announcement bar of the Shopify theme "Dawn" to allow for free expression.

[Dawn] An example of how to insert custom liquid code into the announcement bar of the Shopify theme "Dawn" to allow for free expression.

Applications

  • Header management and editing

How to implement

  • LIQUID
View full details

By default, the announcement bar in Shopify's theme "Dawn" only allows you to specify text and a link, so this is an example of how to add a custom Liquid block. By being able to insert any HTML/CSS/Javascript/Liquid code, you can create highly expressive announcements.


An example of how to insert custom liquid code into the announcement bar of the theme "Dawn" to allow for free expression.


[Setting Method 1] Add a block type to the schema of the "announcement-bar.liquid" section


[Setting Method 2] Modify part of the code in the "announcement-bar.liquid" section (process to determine and display the block type)


[Setting Method 3] Add a custom Liquid type to the display block and insert any code


After making a purchase (all items are ¥0), you will be able to view the sample code.

If you have already made a purchase, please login here.

Sample Codes

Test Theme :Dawn/Rise 15.2.0

「announcement-bar.liquid」セクションのschemaにblockタイプを追加

「announcement-bar.liquid」セクションのコードの一部を修正(blockタイプを判別して表示する処理)