How do I add a scrolling banner to Taste Theme?

Just looking to get a banner looking something like this: (competitor site): https://www.verbenergy.co/

Our site is www.thefeelbar.com

Please help!

Hi @thefeelbar
Here is the video guide for you: https://youtu.be/G3rbIZJSmQg

Would you mind helping me write the code? There was no audio and I was having a hard time following..

Hello, will you be able to help me with this task?

Hi @thefeelbar You only need to copy code, follow the source code url in video description and replace for code in section announcement bar .

Do you know if it will interfere with my wholesale setup? Depending on account tag you will see 2 different banners..

Please review the original and your “scrolling” code. Are you able to create a new one that uses the same logic as the original but still allows scrolling features?

Original:

{%- comment -%} Change on June 09, 2022 by Shane OS., at Shopify – Theme Support {%- endcomment -%}
{% assign wholesale = false %}
{% if collection.handle == ‘wholesale-portal’%}
{% assign wholesale = true %}
{% endif %}
{% for c in product.collections %}
{% if c.handle == “wholesale-portal” %}
{% assign wholesale = true %}
{% endif %}
{% endfor %}

{% if customer.tags contains ‘Wholesale Vendor’ %}

{% if cart.items.size != 0 and cart.total_price < 10000 %}

only {{ 10000 | minus: cart.total_price | money }} away from free shipping!

{% else %}

{{ "welcome wholesale vendors | free shipping on orders over $100" | escape }}

{%- endif -%}
{% else %}
{% if cart.items.size != 0 and cart.total_price < 5000 %}

only {{ 5000 | minus: cart.total_price | money }} away from free shipping!

{% else %}

{{ " :police_car_light: 50% OFF EVERYTHING :police_car_light: use the code BLACKFRIDAYFEELS (sale ends 11/30) :hourglass_not_done: " | escape }}

{%- endif -%}
{% endif %} {%- comment -%} {%- for block in section.blocks -%} {%- case block.type -%} {%- when 'wholesale_announcement' -%} {% if wholesale == true %}
{%- if block.settings.text != blank -%} {%- if block.settings.link != blank -%} {%- endif -%}

{{ block.settings.text | escape }} {%- if block.settings.link != blank -%} {% render 'icon-arrow' %} {%- endif -%}

{%- if block.settings.link != blank -%}
{%- endif -%} {%- endif -%}
{% endif %} {%- endcase -%} {%- endfor -%} {%- endcomment -%}

{% schema %}
{
“name”: “t:sections.announcement-bar.name”,
“max_blocks”: 12,
“blocks”: [
{
“type”: “announcement”,
“name”: “t:sections.announcement-bar.blocks.announcement.name”,
“settings”: [
{
“type”: “text”,
“id”: “text”,
“default”: “Welcome to our store”,
“label”: “t:sections.announcement-bar.blocks.announcement.settings.text.label”
},
{
“type”: “select”,
“id”: “color_scheme”,
“options”: [
{
“value”: “background-1”,
“label”: “t:sections.announcement-bar.blocks.announcement.settings.color_scheme.options__1.label”
},
{
“value”: “background-2”,
“label”: “t:sections.announcement-bar.blocks.announcement.settings.color_scheme.options__2.label”
},
{
“value”: “inverse”,
“label”: “t:sections.announcement-bar.blocks.announcement.settings.color_scheme.options__3.label”
},
{
“value”: “accent-1”,
“label”: “t:sections.announcement-bar.blocks.announcement.settings.color_scheme.options__4.label”
},
{
“value”: “accent-2”,
“label”: “t:sections.announcement-bar.blocks.announcement.settings.color_scheme.options__5.label”
}
],
“default”: “accent-1”,
“label”: “t:sections.announcement-bar.blocks.announcement.settings.color_scheme.label”
},
{
“type”: “url”,
“id”: “link”,
“label”: “t:sections.announcement-bar.blocks.announcement.settings.link.label”
},

{
“type”: “checkbox”,
“id”: “show_wholesale”,
“label”: “Also show on wholesale pages”
}
]
},
{
“type”: “wholesale_announcement”,
“name”: “wholesale announcement”,
“settings”: [
{
“type”: “text”,
“id”: “text”,
“default”: “Welcome to our store”,
“label”: “t:sections.announcement-bar.blocks.announcement.settings.text.label”
},
{
“type”: “url”,
“id”: “link”,
“label”: “t:sections.announcement-bar.blocks.announcement.settings.link.label”
},

{
“type”: “color”,
“id”: “background_color”,
“label”: “Background color”
},

{
“type”: “color”,
“id”: “text_color”,
“label”: “Text color”
}
]
}
],
“default”: {
“blocks”: [
{
“type”: “wholesale_announcement”
}
]
}
}
{% endschema %}

Scrolling:

{%- for block in section.blocks -%} {%- case block.type -%} {%- when 'announcement' -%} {%- if block.settings.text != blank -%} {%- if block.settings.link != blank -%} {%- endif -%} {{ block.settings.text | escape }} {%- if block.settings.link != blank -%} {%- endif -%} {%- endif -%} {%- endcase -%} {%- endfor -%}
{%- for block in section.blocks -%} {%- case block.type -%} {%- when 'announcement' -%} {%- if block.settings.text != blank -%} {%- if block.settings.link != blank -%} {%- endif -%} {{ block.settings.text | escape }} {%- if block.settings.link != blank -%} {%- endif -%} {%- endif -%} {%- endcase -%} {%- endfor -%}
@keyframes marqueeBar { from { transform: translateX(0); } to { transform: translateX(-100%); } } .marquee-bar-section { display: flex; white-space: nowrap; max-width: 100%; overflow: hidden; } .marquee-bar{ --speed: {{- section.settings.speed -}}s; display: flex; flex-shrink: 0; justify-content: space-around; gap: 30px; min-width: 100%; font-size: 13px; text-transform: uppercase; padding: 15px; animation: marqueeBar var(--speed) linear infinite; } {% schema %} { "name": "t:sections.announcement-bar.name", "max_blocks": 5, "settings":[ { "type": "select", "id": "color_scheme", "options": [ { "value": "accent-1", "label": "t:sections.all.colors.accent_1.label" }, { "value": "accent-2", "label": "t:sections.all.colors.accent_2.label" }, { "value": "background-1", "label": "t:sections.all.colors.background_1.label" }, { "value": "background-2", "label": "t:sections.all.colors.background_2.label" }, { "value": "inverse", "label": "t:sections.all.colors.inverse.label" } ], "default": "accent-1", "label": "t:sections.all.colors.label" }, { "type": "select", "id": "speed", "label": "Speed", "default": "20", "options": [ { "value": "50", "label": "50s" }, { "value": "40", "label": "40s" }, { "value": "30", "label": "30s" }, { "value": "20", "label": "20s" }, { "value": "10", "label": "10s" } ] } ], "blocks": [ { "type": "announcement", "name": "t:sections.announcement-bar.blocks.announcement.name", "settings": [ { "type": "text", "id": "text", "default": "Welcome to our store", "label": "t:sections.announcement-bar.blocks.announcement.settings.text.label" }, { "type": "select", "id": "text_alignment", "options": [ { "value": "left", "label": "t:sections.announcement-bar.blocks.announcement.settings.text_alignment.options__1.label" }, { "value": "center", "label": "t:sections.announcement-bar.blocks.announcement.settings.text_alignment.options__2.label" }, { "value": "right", "label": "t:sections.announcement-bar.blocks.announcement.settings.text_alignment.options__3.label" } ], "default": "center", "label": "t:sections.announcement-bar.blocks.announcement.settings.text_alignment.label" }, { "type": "url", "id": "link", "label": "t:sections.announcement-bar.blocks.announcement.settings.link.label" } ] } ], "default": { "blocks": [ { "type": "announcement" } ] } } {% endschema %}