Change the Website Text

Modified on Thu, 14 Nov at 9:58 AM

Overview

This article outlines how to change the text for View Website for your stores in Store Locator.

To display View Website rather than a URL for your stores in Store Locator, please follow the steps below.


Setup

  1. From the Shopify admin, select Apps.
  2. Select Store Locator.
  3. Select Settings.
  4. Select Display Settings.

  5. Copy and paste this code into the Page Footer HTML field:
    <script>
    $('#store_map').click(function(){
    setTimeout(function(){
    $('.website a').text('Visit Website');
    }, 100);
    });
    </script>

    Note: You can change the Visit Website text in this code if you'd like different text to display to your customers.

  6. Save changes



Troubleshooting

If the code in Step 5 doesn't work for you, please use this code instead:

<script> 
var website_link_text = 'Visit Website';

function fixURLS(){
    var websites = jQuery(".addresses .store_website a");
    for(i=0; i<websites.length; i++){
       jQuery(websites[i]).text(website_link_text);
   }
}

$('#store_map, #addresses_list a').click(function(){
 setTimeout(function(){
 $('.website a').text(website_link_text);
 }, 300);
});
</script>

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article