How to Automatically Display Current Date in Shopify Announcement Bar / Header?

Hi everyone,

I’m looking to automate the date display in my Shopify store’s announcement bar (header) so that it always shows the current date (day and month).

This would help keep my store information accurate without needing to update it manually every day. I want it to read something like “All services working - [current date].”

Does anyone know the best way to achieve this? Any guidance or code snippets would be greatly appreciated!

Thanks!

Yes, you could do that.

  1. Click “Edit code” for the theme you wanted.
  2. In file announcement-bar.liquid: Find and replace with this {{ block.settings.text | escape }}
{{ block.settings.text | escape }}{{ "now" | date: "%m-%d" }}

Thank you for the suggestion! I applied the code, and now the date appears on both of my headers.

matias_palacios_1-1724003552603.png

However, I need the date to only appear on the specific header that confirms all services are working (“TODOS LOS SERVICIOS FUNCIONANDO” in spanish).

How can I modify the code so that the date only shows on this particular header and not on the other one?

Thanks in advance for your help!