@ Marco
There’s a lot of moving pieces to add a working map, honestly, it hard to tell what exactly is wrong or yet needs to be done.
May it would be easier for you to tweak the template that you have which does have the map? I know you want to add the map to the Bio Entry Card … but what wrong with the template that already has the map? It does everything the Bio Entry Card, plus more.
But to try to answer you question…
Looks like the snippet I gave you has a copy/paste error, use this:
// Register the required JS file.
add_filter( 'cn_template_required_js-card-bio', 'marco_enqueue_gomap' );
function marco_enqueue_gomap( $required ) {
$required[] = 'jquery-gomap';
return $required;
}
Forget about adding wp_enqueue_script( 'jquery-gomap' );
, I think, but you can add it to the __construct
method in the card-bio.php
file.
You still need the map JavaScript code from the source template. and past it in a file named card-bio.js
.
There’s quite a bit of code in the source template javascript file that relates to the map. It also very likely you’ll have to tweak that code to work with the Bio Entry Card.
Hope that helps!