• Started with a clean WordPress install of version 5.5.3 and LocateAndFilter with the Twenty Twenty theme. Maps and Nav Lists were not displaying. Checking the Console I see an error “Uncaught ReferenceError: jQuery is not defined.”
    If I use an older theme, Twenty Seventeen for instance, the map and navlist shows up.

    If I am logged in and install WordPress’ Enable jQuery Migrate Helper plugin and get some more information, namely, jQuery.fn.load() is deprecated. While logged in with this plugin running, the maps and nav lists are displayed. Additionally, the maps and nav lists display when I am looking at the Customize screens in the WordPress backend.

    It feels like there is some jQuery piece loading as part of the Customize pages plus in older themes that isn’t in Twenty Twenty. Is there a way to get this working with modern themes like Twenty Twenty?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter aetchells

    (@aetchells)

    With the help of this WordPress forum post I updated class-locate-and-filter.php in two places with the new jQuery(window).on('load',function () { lines.

    That eliminated the deprecated error but I still am getting the jQuery is not defined error. Any help would be appreciated.

    Thread Starter aetchells

    (@aetchells)

    I added wp_enqueue_script( 'jquery' ); to the Twenty Twenty theme’s function.php under, function twentytwenty_register_scripts().

    And with that, maps began working while logged in and logged out.

    Hopefully this is of help to anyone who gets similarly stuck.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘jQuery Errors’ is closed to new replies.