shortcode with log lat in variables
-
I´m not sure where is my mistake.
I include this code in template for a customer post:<?php the_content(); // <!-- display img in content --> if ( get_post_meta( $post->ID, 'proyectos_map_location', true ) ) { $gLoc = get_post_meta( $post->ID, 'proyectos_map_location', true ); $gLong = substr($gLoc, 0, strpos($gLoc,',')); $gLat = substr($gLoc, strpos($gLoc,',')+1); $gLoc = "[bgmp-map zoom="; $gLoc .= '"13"'; $gLoc .= ' long="' . $gLong . '" lat="' . $gLat .'"]'; // $gLoc .= "')"; echo $gLoc; do_short_code($gLoc); // echo $gLoc; // with 'do_shot_code' into gLoc // echo do_shortcode('[bgmp-map zoom="13" long=$gLong lat=$gLat]');As you can see, Ive tried several options to execute do_short_code but none of them were ok
function bgmpShortcodeCalled() is included in functions.php with right slugsThanks in advance for your help
Arturohttp://ww.wp.xz.cn/extend/plugins/basic-google-maps-placemarks/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘shortcode with log lat in variables’ is closed to new replies.