How do I change specific links to be buttons?

Highlighted
New Member
2 0 0

Hello!

I'm trying to change some links on my page to be buttons. 

I don't want all links to be buttons, just some so I have been trying to write an if statement. 

Page link: Http://www.esdesk.com.au 

Specifically looking at the 'Shop Now' link under the 'esdesk has your back' section on the home page. 

I have been attempting to modify the home-text.liquid page as we are using the sections pro app. 

I used this, but I really don't know what I'm doing. Any help would be appreciated!!

{% if feature.title =="esdesk has your back" %}
<a href class=button></a>

{% endif %}

Thanks

Jo 

0 Likes
Highlighted
Shopify Partner
2328 507 658

Hey @Jojobananas ,

Try like this:

{% if feature.title =="esdesk has your back" %}
<a href="#" class=button></a>
{% else %}
<a href="#"></a>
{% endif %}

 

Thanks! 

If helpful then please Like and Accept Solution.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes
Highlighted
New Member
2 0 0

Thanks for the reply. That's not working. 

Can you suggest where I should be putting it? Maybe I'm not putting it in the right place. 

0 Likes
Highlighted
Shopify Partner
2328 507 658

Hey @Jojobananas,

This is the tedious job but for the "SHOP NOW" button you mentioned. You have to find related files in the sections folder and change the link code accordingly. e.g for "SHOP NOW", you must have some file in sections folder like featured-text.liquid or something else. So you need to find that and do your changes accordingly.

Hope this helps.

Thanks!

If helpful then please Like and Accept Solution.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
0 Likes