• Resolved husbandman

    (@husbandman)


    I cannot get jQuery to load in my WordPress install. I have no plugins activated and have tried both Astra and Twenty Twenty. If I activate JetPack or Wordfence then jQuery will load but only Chrome desktop, not Safari. It will not load in Chrome or Safari on my iPhone.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Tyler

    (@tylerthedude)

    Are you trying to run custom jQuery code? I see there is an error being logged in the console, which relates to jQuery being undefined. The two themes you’re referring to should be loading jQuery, as from my understanding they both rely on it. If you’re using some sort of child theme, then you will need to enqueue jQuery on your theme. To do this, simply paste the following code into your child theme:

    wp_enqueue_script( 'jquery' );

    Once jQuery is being loaded by the theme, then the error(s) should go away.

    Thread Starter husbandman

    (@husbandman)

    I was not running a child theme. I already considered that. Because of what you said I created a child theme and enqueue jQuery and now we are good. I never had to do this before. It is the free version of Astra, but you said Twenty Twenty needs jQuery. This is all rather curious.

    • This reply was modified 5 years, 9 months ago by husbandman.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘jQuery not loading in install’ is closed to new replies.