Re: DAWN THEME: How do i put phone number and email address in annoucement bar?

Solved

DAWN THEME: How do i put phone number and email address in annoucement bar?

SCHOIE1981
Excursionist
18 0 5

Hi.

 

im wanting to put my phone number and email address in announcement bar, do anyone know how i can do this?

 

kind regards,

Accepted Solution (1)

wmiz
Shopify Partner
40 7 37

This is an accepted solution.

Hello,

You can add links to your site's announcement bar by doing the following:

  1. Log in to your Shopify admin.
  2. Click on "Online Store" in the left-hand menu, and then click on "Themes."
  3. Find the theme you want to edit and click the '...' -> Edit Code
  4. Open your 'announcement.liquid' file in the Sections folder of your site's code
  5. Locate the following lines
 <p class="announcement-bar__message h5">
                {{ block.settings.text | escape }}
                {%- if block.settings.link != blank -%}
                  {% render 'icon-arrow' %}
                {%- endif -%}
              </p>

6. Remove the '| escape' from the {{ block.settings.text | escape}} line. It should now look like:

<p class="announcement-bar__message h5">
                {{ block.settings.text }}
                {%- if block.settings.link != blank -%}
                  {% render 'icon-arrow' %}
                {%- endif -%}
              </p>

7. Save the changes

8. Back in the theme customizer on your announcement bar's text settings enter the following

Welcome to our store! <a href="tel:1234567890">Call us!</a> <a href="mailto:example@example.com">Email us!</a>

9. The a tags can now be wrapped around any text to create a link. tel: prefix lets the browser know it is  a phone number & mailto: let's the browser know it is an email. 

Learn how to code Shopify sites: My YouTube channel

Weekly Shopify advice: ShopSavvy newsletter


Work with me: willmiswebdev@gmail.com

View solution in original post

Replies 6 (6)

wmiz
Shopify Partner
40 7 37

This is an accepted solution.

Hello,

You can add links to your site's announcement bar by doing the following:

  1. Log in to your Shopify admin.
  2. Click on "Online Store" in the left-hand menu, and then click on "Themes."
  3. Find the theme you want to edit and click the '...' -> Edit Code
  4. Open your 'announcement.liquid' file in the Sections folder of your site's code
  5. Locate the following lines
 <p class="announcement-bar__message h5">
                {{ block.settings.text | escape }}
                {%- if block.settings.link != blank -%}
                  {% render 'icon-arrow' %}
                {%- endif -%}
              </p>

6. Remove the '| escape' from the {{ block.settings.text | escape}} line. It should now look like:

<p class="announcement-bar__message h5">
                {{ block.settings.text }}
                {%- if block.settings.link != blank -%}
                  {% render 'icon-arrow' %}
                {%- endif -%}
              </p>

7. Save the changes

8. Back in the theme customizer on your announcement bar's text settings enter the following

Welcome to our store! <a href="tel:1234567890">Call us!</a> <a href="mailto:example@example.com">Email us!</a>

9. The a tags can now be wrapped around any text to create a link. tel: prefix lets the browser know it is  a phone number & mailto: let's the browser know it is an email. 

Learn how to code Shopify sites: My YouTube channel

Weekly Shopify advice: ShopSavvy newsletter


Work with me: willmiswebdev@gmail.com
SCHOIE1981
Excursionist
18 0 5

Can I left justify it without it being a global setting for all announcements?

Blader4
Visitor
1 0 0

Grettings, can help me w the step 8.

EcomGraduates
Shopify Partner
735 63 105

In the "Announcement message" field, type in your phone number and email address, like this:

For phone number: "Call us at: 123-456-7890"

For email address: "Email us at: info@example.com"

Click "Save" to save your changes.


If this fixed your issue, likes and accepting as a solution are highly appreciated.

Build an online presence with our custom built Shopify Theme EcomifyTheme




SCHOIE1981
Excursionist
18 0 5

Ho ho ho

SCHOIE1981
Excursionist
18 0 5
Ho ho ho