How can I add a heading to my timer code?

Topic summary

A user is implementing a countdown timer using Liquid code and wants to add a heading or text label to it. The timer currently displays only numbers without any descriptive text.

Initial Problem:

  • Timer code shows countdown values (days, hours, minutes, seconds) but lacks explanatory text
  • User wants to add a heading to provide context

Solution Provided:

  • Add an HTML heading element (e.g., ## Countdown Timer) before the countdown div
  • Use standard markup to insert text above the timer display

Follow-up Issue:

  • The heading now appears, but it’s positioned below the timer box instead of inside it
  • User wants the heading to display within or beside the timer’s container box

The discussion remains open as the positioning issue needs to be resolved. The code snippets appear partially corrupted or reversed in the original posts, which may complicate troubleshooting.

Summarized with AI on November 20. AI used: claude-sonnet-4-5-20250929.

Hi this is my timer code and I wanna add at him heading, write some text, because now its showing just the numbers.

{% capture time_check %}
{% for tag in product.tags %}
{%if tag contains 'Time_' %}
{% assign tag_time = tag | split : 'Time_' | last %}
{{ tag_time }}
{% endif %}
{%  endfor %}
{% endcapture %}
{% if tag_time %}

  

    

      00
      Days
    

    
      00
      Hours
    

    
      00
      Minutes
    

    
      00
      Seconds

To add a heading or text above the timer, you can simply include an HTML element before the countdown_time div. Here’s an updated version of your code with a heading added:

{% capture time_check %}
  {% for tag in product.tags %}
    {% if tag contains 'Time_' %}
      {% assign tag_time = tag | split: 'Time_' | last %}
      {{ tag_time }}
    {% endif %}
  {% endfor %}
{% endcapture %}

{% if tag_time %}
  ## Countdown Timer
  
    

      

        00
        Days
      

      
        00
        Hours
      

      
        00
        Minutes
      

      
        00
        Seconds
      

    

  

{% endif %}

@NomtechSolution

It’s working but I wanna add heading inside trhe box of my counter, now shows below the box timer.