Title: Underscore is not defined
Last modified: November 27, 2022

---

# Underscore is not defined

 *  [sirio13](https://wordpress.org/support/users/sirio13/)
 * (@sirio13)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/underscore-is-not-defined/)
 * I’ve been using the WP Store Locator plugin for a while now, with a theme called
   Lovecraft in one of my websites. The plugin is really good, but I don’t know 
   when it stopped working with some javascript issues, telling me that “Uncaught
   ReferenceError: _ is not defined”.
 * If I switched to the default theme, it’s working again, but I’d like to keep 
   the current theme and this plugin working together. I’ve been trying my best 
   to find a workaround, reading documentation and found nothing so far.
 * So here I am, I didn’t want to bother anyone, but I don’t know what to do next(
   yes, of course an option would be to change the theme or the plugin and make 
   some big changes…). I read this article ([https://wpstorelocator.co/document/map-does-not-load-no-results/](https://wpstorelocator.co/document/map-does-not-load-no-results/))
   and this issue is precisely there (more or less) in the section “There are JavaScript
   errors”. But, what next? Everything else seems to be OK 🙁
 * Please, is there any easy workaround I’m missing here?
 * Thanks a lot.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funderscore-is-not-defined%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [farroyo](https://wordpress.org/support/users/farroyob/)
 * (@farroyob)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/underscore-is-not-defined/#post-16240200)
 * Hi there!
 * You are not bothering anyone, we’re here to help!
 * First of all, it seems obvious there is something about the Lovecraft theme that
   does not get along very well with Wp Store Locator, but it is hard for me to 
   know what it is because, as you understand, there are thousands of themes and
   I only know a small bunch of them.
 * Having said that, please try the following. First, to rule out that it is something
   related exclusively to the theme, keep the Lovecraft theme active but disable
   all other plugins except wp store locator and see if the problem persists.
 * Additionally, please also try to enable compatibility mode in Wp Store Locator
   settings, near the end.
 * Let us know if any of the above rings a bell and get back to us.
    Regards!
 *  Thread Starter [sirio13](https://wordpress.org/support/users/sirio13/)
 * (@sirio13)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/underscore-is-not-defined/#post-16242004)
 * Hi farroyo, I’m really grateful for your answer.
 * Unfortunately I’ve tested both actions but nothing has changed. I don’t know,
   I think I’m going to compare at source code level and see if there is any difference
   that could be causing that issue.
 * I posted the same problem in the Lovecraft theme forum before coming here, and
   still waiting for any reply. If I find the solution I’ll post it here in case
   anybody has the same problem with that or any other theme.
 * Thanks guys.
 *  [farroyo](https://wordpress.org/support/users/farroyob/)
 * (@farroyob)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/underscore-is-not-defined/#post-16244453)
 * I’m so sorry it doesn’t work… Let’s see what the people at Lovecraft support 
   have to say, maybe they can find out what this is all about.
 * In any case, if you want us to take a look at your site, just in case, plese 
   drop us a [support ticket](https://wpstorelocator.co/support/) and maybe you 
   can create a temporary user for us.
 * Regards,
 *  Thread Starter [sirio13](https://wordpress.org/support/users/sirio13/)
 * (@sirio13)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/underscore-is-not-defined/#post-16245818)
 * Hi again,
 * Luckily I’ve found the root of the issue, and it’s not about the theme itself,
   but a custom HTML widget which was used to display a Mailchimp subscription pop-
   up when the user scrolls down the page. I’m trying to find that code in official
   Mailchimp documentation, but haven’t found anything so far (but it’s displayed
   in many websites).
 * For the moment I’ve removed that widget and WP Store Locator is working properly!
   So if you ask about the theme, the difference with the default one is… that Lovecraft
   displays those widgets in the page where I’m using your plugin. I’ve been testing
   this all the afternoon and I’m happy for finding this issue.
 * Thanks for your help and interest, farroyo.
 * Regards.
 *  [farroyo](https://wordpress.org/support/users/farroyob/)
 * (@farroyob)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/underscore-is-not-defined/#post-16247438)
 * Hi again,
 * Wow, that was a difficult one. I’m glad you spotted it. The problem with modern
   websites is that there are so many plugins, so many potential interactions, than
   when something goes wrong sometimes it is very difficult to debug, I’m glad you
   figured this out!
 * Regards,

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Underscore is not defined’ is closed to new replies.

 * ![](https://ps.w.org/wp-store-locator/assets/icon-256x256.jpg?rev=1007784)
 * [WP Store Locator](https://wordpress.org/plugins/wp-store-locator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-store-locator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-store-locator/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-store-locator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-store-locator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-store-locator/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [underscore](https://wordpress.org/support/topic-tag/underscore/)

 * 5 replies
 * 2 participants
 * Last reply from: [farroyo](https://wordpress.org/support/users/farroyob/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/underscore-is-not-defined/#post-16247438)
 * Status: not resolved