Hamburger menu not working and search bar not working as it should (Craft)

Hamburger menu not working and search bar not working as it should (Craft)

CraigReep
Excursionist
52 0 3

Hi I updated to the new craft version now my hamburger menu isn't working. This is my default in the theme, I was working with shopify support and whatever they did had stopped it from working. When I click it nothing happens but highlighting the page logo. 

Also when using the search bar, no search results show up as your typing like it should/ use to. Can anyone help.

https://madetomeasurewoodengates.co.uk/
pass: chameleonDesktop Screenshot 2024.07.02 - 14.26.54.13.png

Replies 5 (5)

vm-web
Shopify Partner
29 1 4

@CraigReep 

I have checked your website and found some JS errors Contact the Shopify expert because without checking your theme code not solve your problem.
Thanks!

If helpful then please Like and Accept Solution.

tim
Shopify Partner
3638 315 1344

Briefly -- I see 2 things to fix.

One is minor -- you have included your GTAG initialization twice:

 

<head>
  <!-- Google tag (gtag.js) -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=G-K2B07QQZ4P">
  </script>
  <script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
      dataLayer.push(arguments);
    }
    gtag('js', new Date());
    gtag('config', 'G-K2B07QQZ4P');
  </script>
  <!-- Google tag (gtag.js) -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=G-K2B07QQZ4P"></script>
  <script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
      dataLayer.push(arguments);
    }
    gtag('js', new Date());
    gtag('config', 'G-K2B07QQZ4P');
  </script>

 

And the second one is probably the cause of your problems:

 

  <style>
    html:has(link[title="Feed"][href="/collections/double-gate.atom"]) .price,
    html:has(link[title="Feed"][href="/collections/single-gate.atom"]) .price,
    html:has(link[title="Feed"][href="/collections/matching-side-panels.atom"]) .price,
    html:has(link[title="Feed"][href="/collections/bifold-gates.atom"]) .price,
    html:has(link[title="Feed"][href="/collections/trifold-gates.atom"]) .price {
      display: none !important;
    }

    <meta charset="utf-8">

 

There must be a closing </style> tag before the <meta ...> tag.

Although I have no idea why this CSS code is there...

 

Fix these and hopefully your problems will go away. Let me know if not.

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
CraigReep
Excursionist
52 0 3
Hi thank you for your response. I'm not great at code myself would it be possible you add the closing "style" as im a little unsure and don't want to mess any code up further.

The google tag was one for sitemap and one for analytics, it prompted me to add the second should their only be one?

Kind Regards
Charlie


tim
Shopify Partner
3638 315 1344

The gtag codes are the same aren't they?

As for the <style>... -- you can try removing this snippet of code altogether, just live the <meta> line.

 

If you're unsure, contact shopify support or e-mail/dm me the collab account request code and I will send an account request to your store in my morning.

 

 

 

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
CraigReep
Excursionist
52 0 3

Hi I believe that code is for an app, although that has not worked unfortunately.