为什么这段代码不起作用?
<?php
echo do_shortcode('[pw_map address="global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, 'codigo_postal', true);" height="120px"]');
?>
codigo_postal 的值是 28004。如果我放这个,就可以了!
<?php
echo do_shortcode('[pw_map address="28004" height="120px"]');
?>