09/13/2014 at 7:24 pm
#303866
Keymaster
@ Marco
You also need the javascript from the template you’ve copied this from. You also need to make to to call this:
wp_enqueue_script( 'jquery-gomap' );
You should not do this from within the template because it only needs called once. Putting it in the template will call it each time an entry is displayed. Here’s the code:
// Register the required JS file.
add_filter( 'cn_template_required_js-cmap', 'marco_enqueue_gomap' );
function marco_enqueue_gomap( $required ) {
$required[] = 'jquery-gomap';
return $required;
}
Hope that helps!