Hi,
I’m aware there are a few apps that offer the option of showing a different announcement depending on the customers’ IP address and geolocation, but I’m not looking to pay any more in terms of monthly fees for features I feel could be achieved with a little bit of simple editing to the already existing theme code. I’ve tried a few of the free apps as well but they either display in a weird way or are just incompatible with my site for whatever reason.
With that in mind, does anyone know of a way I could edit the existing announcement-bar code to show one message for say customers in the UK, and another message for everyone else in the world, (see below for how it exists in my header.liquid section)?
Thanks for the help,
Mark
.announcement-bar–link:hover {
{% assign brightness = section.settings.color_bg | color_brightness %}
{% if brightness <= 192 %}
{% assign lightenAmount = 255 | minus: brightness | divided_by: 255 | times: 16 %}
background-color: {{ section.settings.color_bg | color_lighten: lightenAmount }};
{% else %}
{% assign darkenAmount = 255 | divided_by: brightness | times: 8 %}
background-color: {{ section.settings.color_bg | color_darken: darkenAmount }};
{% endif %}
}
.announcement-bar__message {
color: {{ section.settings.color_text }};
}
{% if section.settings.link == blank %}
{% else %} {% endif %}{% endif %}
{% endif %}