Passing parameter to do_shortcode Home › Forums › MapPress Support › Passing parameter to do_shortcode Tagged: do_shortcode This topic has 1 reply, 1 voice, and was last updated 4 months, 3 weeks ago by Chris. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts March 25, 2026 at 6:06 pm #22029 katenParticipant I have this in a template: $mapid = get_field( ‘map_id’, get_the_id()); if ($mapid){ echo do_shortcode(‘[[mappress mapid="'.$mapid.'"]]‘); } It is not outputting the map, it outputs the shortcode itself on the page: [mappress mapid="315"] What am I doing wrong here? March 25, 2026 at 6:08 pm #22030 ChrisKeymaster Hi, I think when you use double braces for a shortcode, WordPress just outputs it as a string. Try with just one brace: echo do_shortcode(‘[mappress mapid="'.$mapid.'"]‘); Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In