In functions.php I've tried this:
civicrm_initialize(); $manager = CRM_Core_Resources::singleton(); $manager->addCoreResources(); $manager->addScriptUrl(path-to-ajax.js); // looking around through the available scripts this seemed the obvious candiate
I can get it to load scripts via wp_enqueue_script, but I have no idea which scripts it needs. The docs appear to suggest that it should just magically load everything into the header but that isn't the case for me. The CRM object is never defined.
What I want to do is grab the event list in JSON format.
Any clues? What am I missing?