Add Phone Number to Header - Streamline

ColbyCarter
New Member
6 0 0

Hi there,

I've been trying to add a clickable business phone number to our website, but can't seem to have any luck.

I'd like it to be next to the left of the search icon.

Website for reference: www.mvmntsports.ca

Phone number: 604-889-8261

Theme: Streamline

Please help

Cheers,

Colby

Replies 10 (10)
devangfour
Excursionist
42 10 8

You need to modify some code.

 

If you don't just add below JS

jQuery(".site-nav__icons").prepend('<a href="tel:604-889-8261" class="site-nav__link site-nav__link--icon js-modal-open-search-modal js-no-transition" aria-expanded="false">Phone</a>');

 

Thanks

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on devangfour@gmail.com regarding any help
ColbyCarter
New Member
6 0 0
Don't know much coding myself. Is there somewhere I can add this into the
theme.liquid area?

I tried adding yours below, but no luck. Maybe I'm pasting it in the wrong
area.
devangfour
Excursionist
42 10 8

Search with ".js" and you can see theme.js file. Open that and add code into that

 

If you don't find just add into theme.liquid with below code

 

jQuery(".site-nav__icons").prepend('<a href="tel:604-889-8261" class="site-nav__link site-nav__link--icon js-modal-open-search-modal js-no-transition" aria-expanded="false">Phone</a>');
If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on devangfour@gmail.com regarding any help
ColbyCarter
New Member
6 0 0
I must be doing something incorrectly or putting it in the wrong section of
code...nothing seems to be working.

I enter the code, click "preview" and it's nowhere to be found.

Is there a specific spot to enter either of those in? Or what step am I
missing?
devangfour
Excursionist
42 10 8

Can you send me access your store on devangfour@gmail.com? Or you can WhatsApp me on +918511311811

 

Or send me screenshot of code

 

Thanx

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on devangfour@gmail.com regarding any help
ColbyCarter
New Member
6 0 0








{% if fa_google_coding %}{% assign fa_google_coding = true %}{%- else -%}{%
assign fa_google_coding = false %}{%- endif -%}
{% if fa_google_coding == false %}

{%- endif -%}
{%- assign fa_current_variant = product.selected_or_first_available_variant
-%}
{%- if cart.currency.iso_code == 'GBP' or cart.currency.iso_code == 'USD'
or cart.currency.iso_code == 'CAD' or cart.currency.iso_code == 'AUD' or
cart.currency.iso_code == 'BWP' or cart.currency.iso_code == 'BND' or
cart.currency.iso_code == 'DOP' or cart.currency.iso_code == 'GTQ' or
cart.currency.iso_code == 'HKD' or cart.currency.iso_code == 'INR' or
cart.currency.iso_code == 'ILS' or cart.currency.iso_code == 'YEN' or
cart.currency.iso_code == 'KES' or cart.currency.iso_code == 'KOR' or
cart.currency.iso_code == 'LBP' or cart.currency.iso_code == 'MYR' or
cart.currency.iso_code == 'MXN' or cart.currency.iso_code == 'NPR' or
cart.currency.iso_code == 'NZD' or cart.currency.iso_code == 'NIO' or
cart.currency.iso_code == 'NGN' or cart.currency.iso_code == 'PKR' or
cart.currency.iso_code == 'CNY' or cart.currency.iso_code == 'PHP' or
cart.currency.iso_code == 'SGD' or cart.currency.iso_code == 'LKR' or
cart.currency.iso_code == 'CHF' or cart.currency.iso_code == 'TWD' or
cart.currency.iso_code == 'TSH' or cart.currency.iso_code == 'THB' or
cart.currency.iso_code == 'UGX' or cart.currency.iso_code == 'KWD' -%}
{% if template contains 'product' %}
{%- assign fa_product_price = fa_current_variant.price |
money_without_currency | remove:',' -%}
{% elsif template contains 'cart' %}
{%- assign fa_product_price = cart.total_price | money_without_currency |
remove:',' -%}
{% endif %}
{%- else -%}
{% if template contains 'product' %}
{%- assign fa_product_price = fa_current_variant.price |
money_without_currency | remove:'.' | replace: ',', '.' -%}
{% elsif template contains 'cart' %}
{%- assign fa_product_price = cart.total_price | money_without_currency |
remove:'.' | replace: ',', '.' -%}
{% endif %}
{%- endif -%}

{%- if sku == 'default' -%}
{%- capture sku_value -%}shopify_{{ sku_alpha2_code }}_{{ product.id }}_{{
fa_current_variant.id }}{%- endcapture -%}
{%- elsif sku == 'product_id' -%}
{%- capture sku_value -%}{{ fa_current_variant.id }}{%- endcapture -%}
{%- elsif sku== 'parent_id' -%}
{%- capture sku_value -%}{{product.id }}{%- endcapture -%}
{%- elsif sku == 'sku' -%}
{%- capture sku_value -%}{{ fa_current_variant.sku }}{%- endcapture -%}
{%- endif -%}




{% if template contains 'collection' %}
{% assign fa_event = 'view_item_list' %}
{% elsif template contains 'product' %}
{% assign fa_event = 'view_item' %}
{% elsif template contains 'search' %}
{% assign fa_event = 'view_search_results' %}
{% elsif template contains 'cart' %}
{% assign fa_event = 'add_to_cart' %}
{% elsif template contains 'index' %}
{% assign fa_event = 'home' %}
{% else %}
{% assign fa_event = 'other' %}
{% endif %}



<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="theme-color" content="{{ settings.color_button }}" />









{%- if settings.favicon != blank -%}

{%- endif -%}

{%- render 'seo-title' -%}

{%- if page_description -%}
<meta name="description" content="{{ page_description | escape }}" />
{%- endif -%}

{%- render 'social-meta-tags' -%}

{{ content_for_header }}



{%- render 'css-variables' -%}
{%- render 'critical-css' -%}
{%- render 'load-css' -%}


{%- if shop.enabled_currencies.size > 1 -%}

onload="this.onload=null;this.rel='stylesheet'">

{%- endif -%}

{%- if request.page_type contains 'customers/' -%}

{%- endif -%}

{{ shop.metafields.loox["global_html_head"] }}

{% include 'gem-app-header-scripts' %}



{% include 'ufe-offer' %}



data-animate_underlines="true" data-animate_images="{{
settings.animate_images }}" data-button_style="{{settings.button_style}}"
data-type_product_capitalize="{{settings.type_product_capitalize}}"
data-type_header_capitalize="{{settings.type_header_capitalize}}"
data-product_image_scatter="{{settings.product_image_scatter}}"
data-button_type_style="{{settings.button_type_style}}">


class="icon icon--full-color icon-loader--full-color">
class="icon-loader__close" d="M19 17.61l27.12 27.13m0-27.12L19
44.74"/>




{%- if settings.animate_page_transitions -%}

{%- endif -%}

{%- liquid
assign loader_size = settings.desktop_loader_width | append: 'x'
assign loader_size_mobile = settings.mobile_loader_width | append: 'x'
-%}


{%- if settings.logo_loader_image != blank -%}


class="loader-logo__img"
src="{{ settings.logo_loader_image | img_url: loader_size }}"
srcset="{{ settings.logo_loader_image | img_url: loader_size }}
1x, {{ settings.logo_loader_image | img_url: loader_size, scale: 2 }} 2x"
aria-hidden="true">

{%- else -%}
{{ 'general.accessibility.loading' | t
}}

{%- endif -%}



href="#MainContent">{{ 'general.accessibility.skip_to_content' | t }}




{%- section 'header' -%}


{{ content_for_layout }}


{%- section 'social' -%}
{%- section 'footer' -%}



{%- section 'newsletter-popup' -%}

{%- render 'video-modal' -%}
{%- if settings.animate_page_transition_style == 'page-logo' -%}

{%- if settings.logo_loader_image != blank -%}


class="loader-logo__img"
src="{{ settings.logo_loader_image | img_url: loader_size }}"
srcset="{{ settings.logo_loader_image | img_url: loader_size
}} 1x, {{ settings.logo_loader_image | img_url: loader_size, scale: 2 }} 2x"
aria-hidden="true">

{%- else -%}
{{ 'general.accessibility.loading' | t
}}

{%- endif -%}

{%- endif -%}



{%- render 'photoswipe-template' -%}
{%- if settings.cart_type == 'drawer' -%}
{%- render 'cart-drawer' -%}
{%- endif -%}

{{ shop.metafields.loox["global_html_body"] }}

{% include 'gem-app-footer-scripts' %}

{% render 'paywhirl-main' %}
{% include 'upsell-wizard-subscriptions' %}



devangfour
Excursionist
42 10 8

Bottom of the theme.liquid put this code

<script type="text/javascript">
jQuery(".site-nav__icons").prepend('<a href="tel:604-889-8261" class="site-nav__link site-nav__link--icon js-modal-open-search-modal js-no-transition" aria-expanded="false">Phone</a>');
</script>
If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on devangfour@gmail.com regarding any help
ColbyCarter
New Member
6 0 0
Still nothing
devangfour
Excursionist
42 10 8

Sorry @ColbyCarter 

 

But, I can't say more without checking the code design

 

Thank you

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on devangfour@gmail.com regarding any help