Removing Variant URL in Venture Theme

New Member
1 0 0

I ran into the issue recently of my product URLs all of a sudden loading with variant IDs at the end. This wasn't something I wanted or activated, but appears to be something that may have been precoded with my theme. I'm using the free theme Venture for my site.

As someone who's not super adept at coding it was hard to figure out where to fix this based on existing forum discussions. So here's what I did (and please let me know if this is somehow wrong but it appears to be working).

Go to your admin panel, select Online Store, click the three little dots, and go to Edit HTML/CSS:

In the sidebar on the next page, go to the Assets folder, and select theme.js.liquid

Now scroll until you find the following code. What you'll be doing is editing enableHistoryState from true to false

// Initialize multiple variant selector dropdowns
  new Shopify.OptionSelectors('ProductSelect', {
    product: theme.productSingleObject,
    onVariantSelected: theme.productVariantCallback,
    enableHistoryState: false

Save and go click on a product on your site to make sure it worked. :)

I hope that's clear and that it helps anyone else who ran into this problem! As someone unfamiliar with the coding aspect of my site I think a step-by-step would have been super helpful for myself at least.

Shopify Staff (Retired)
Shopify Staff (Retired)
338 0 61

Hi Cailey,

Thanks for letting us know!! :)

Alicia | Support Lead for Shopify
5 0 1

What file I can find these code? I tried to saerch for the code in every file using built-in search of Shopify but no luck

New Member
16 0 0

AM using Avanue theme i did this but this not working why? can you please give some suggestion