07/07/2014 at 5:49 pm
#296269
Keymaster
@ Robyn
Ok, I see now. It is a JavaScript conflict with the theme. Both Connections and the theme enqueues a JavaScript with a handle of jquery-preloader (an alias). The theme wins and loads its file which is not the one required by Connections.
Here’s an update safe method that might fix it…
First install the Code Snippets plugin.
After it is installed, create a new snippet with the following code:
add_action( 'wp', 'cn_register_javascript_preloader', -9999 );
add_action( 'wp_enqueue_scripts', 'cn_enqueue_javascript_preloader', -9999 );
function cn_register_javascript_preloader() {
// Grab an instance of the Connections object.
$instance = Connections_Directory();
// If SCRIPT_DEBUG is set and TRUE load the non-minified JS files, otherwise, load the minified files.
$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_register_script( 'cn-jquery-preloader', CN_URL . "assets/js/jquery.preloader$min.js", array( 'jquery' ), '1.1', $instance->options->getJavaScriptFooter() );
if ( ! is_admin() ) {
wp_register_script( 'cn-ui', CN_URL . "assets/js/cn-user$min.js", array( 'jquery', 'cn-jquery-preloader' ), CN_CURRENT_VERSION, $instance->options->getJavaScriptFooter() );
}
}
function cn_enqueue_javascript_preloader() {
wp_enqueue_script( 'cn-ui' );
}
That should work. Let me know.
