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 quotes

so 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

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -