Widgets don’t appear when Shopify pages load Print

Modified on: Wed, 29 Mar, 2023 at 4:30 PM


Because of Shopify limitations, Smart Search Bar & Filters widgets only load after the entire page is loaded. That’s why the widgets may not be displayed correctly after the page is opened.

However, you can insert the Smart Search Bar & Filters widgets’ code into the store’s theme template for the widgets to load faster. To do so, follow these steps:


    1. Go to your Shopify admin panel > Online store > Themes.
    2. Find the theme you want to edit, and then click Actions > Edit code.
    3. In the Layout directory click theme.liquid.
    4. Find the liquid tag {{ content_for_header }}, which is usually located between the <head> and </head> tags, and paste the following code line in front of it:
      <script src="//searchserverapi.com/widgets/shopify/init.js?a=API_KEY"></script>
      
      Important info

      Replace API_KEY in the code line with the API Key of your Searchanise subscription. You can find it in the Smart Search Bar & Filters control panel > Dashboard section.Widgets don’t appear when Shopify pages load

      Widgets don’t appear when Shopify pages load

    5. Save the changes.

That’s it. The widgets are now loaded faster.

Widgets don’t appear when Shopify pages loadFind out about Shopify speed optimization to improve the user experience of your shoppers and boost your sales.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.