Tell us what you are trying to do? In my page template I am able to add those short codes to show Google maps.
[wpv-map-render map_id="map-1" map_width="100%" map_height="300px"][/wpv-map-render]
[wpv-map-marker map_id='map-1' marker_id='marker-1' marker_field='wpcf-address-google-maps'][/wpv-map-marker]
This is so far working.
But now, I like to have an own short code - where both short codes above are in - basically only showing, when we have the field Map Address filled out.
I am trying to do as following:
function func_display_map($atts) {
global $post;
$str = '';
$field_value = types_render_field("address-google-maps", array());
if(!empty($field_value)){
echo do_shortcode('[wpv-map-render map_id="map-1" map_width="100%" map_height="300px"][/wpv-map-render]' );
}
}
add_shortcode( 'show_villa_map', 'func_display_map' );
But it is not working as expected, it just shows nothing.
Is there any documentation that you are following? Not really found a good documentation
Is there a similar example that we can see? hidden link
What is the link to your site? hidden link