Venture Theme - Promo Bar Link Targeting

New Member
5 0 0

This should be rather simple but I am having a hard time changing the promo bar's link targeting. I have modified this theme extensively and know it pretty well but I think there is javascript that injecting the targeting to the "notification__inner--has-link" class or to the "notification__link" class. I have tried manually changing it but it just get's overwritten. I could not find any reference to it in the theme. js files where the notification bar prototypes are. 

 

We want it to target="_self" btw. It currently is _blank which is annoying when we are just linking internally.

 

Any help would be greatly appreciated. 

 

c.

0 Likes

Hello 

Please share your site url.
And also share screenshots for announcement bar where you want to change.
So that i will check and let you know.

Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Custom Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Digital Marketing | Site Speed Optimization | Web Development
0 Likes
New Member
5 0 0
It’s https://greenbeanscoffee.com/

It’s the brown promo bar that says “Buy a service member their next cup of joe!”.

Thanks for the reply.
0 Likes

Go to shopify admin panel
Online Store-> Themes -> Edit code->Sections->header.liquid

Serach below code

<a href="{{ section.settings.promo_bar_link }}" class="notification__link">
<span class="notification__message">{{ section.settings.promo_bar_text | escape }}</span>
</a>

Replace above code with

<a href="{{ section.settings.promo_bar_link }}" class="notification__link" target="_self">
<span class="notification__message">{{ section.settings.promo_bar_text | escape }}</span>
</a>
Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Custom Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Digital Marketing | Site Speed Optimization | Web Development
0 Likes
New Member
5 0 0
As I mentioned in my first post. It’s not in the header. I can find where it should be but it’s not there and if add the target=“_self” it just gets overwritten. I even threw in a test class In the same file just to make sure it was the right file. It’s getting injected via jquery or some other DOM method.
0 Likes
New Member
5 0 0

Actually the live site has the changes you mention with the test class as you can see in this screencap:

 

Screen Shot 2019-10-17 at 12.14.51 AM.pngScreen Shot 2019-10-17 at 12.15.27 AM.png

 

Actual code from the header section:

 

{% if section.settings.promo_bar_link != blank %}
              <a href="{{ section.settings.promo_bar_link }}" class="notification__link test" target="_self">
                <span class="notification__message">{{ section.settings.promo_bar_text | escape }}</span>
              </a>
            {% else %}
0 Likes
Highlighted

As you can see on below screens i have added above code and it works perfectly for target _self.

 

11.jpg

Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Custom Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Digital Marketing | Site Speed Optimization | Web Development
0 Likes