php - Wordpress shortcode rendering -
i made basic shordcode
function map_test(){ $map_render = '<p>test</p>'; return $map_render; } add_shortcode( 'map_shortcode', 'map_test' );
and shortcode created , works fine until
if ( shortcode_exists( 'map_shortcode' ) ) { echo do_shortcode('[map_shortcode]'); }
i
test
rendered after element there number 1 double quotesso wondering why "1" there , made render, how remove it?
try following check short code existence , remove same:
function shortcode_exists( $tag ) { global $shortcode_tags; return array_key_exists( $tag, $shortcode_tags ); }
Comments
Post a Comment