Underscore Undefined When Using Custom Theme
-
I just installed Dave’s Live Search for use with my custom theme but the JavaScript console complains: “Uncaught ReferenceError: _ is not defined”. If I switch over to the default TwentyFourteen theme, however, the erorr goes away.
I tried running wp_script_is() from DavesWordPressLiveSearch::advanced_search_init() and it looks like the script *is* enqueued as it should be…
A temporary fix appears to be to add “underscore” as a dependency of the “daves-wordpress-live-search” script as it is enqueued on lines 38 and 43 of class-daves-wordpress-live-search.php. Obviously, I’d like to figure out why Live Search works with other themes but not mine, though.
Thanks in advance for your help!
https://www.ads-software.com/plugins/daves-wordpress-live-search/
- The topic ‘Underscore Undefined When Using Custom Theme’ is closed to new replies.