WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do you display or process HTML in a wrapped shortcode ?

[myshortcode]<div class="map"></div>[/myshortcode]

my shortcode code is

function myshortcode_sc($atts, $content = null) {
extract( shortcode_atts( array(
    'col' => 'left',
    ), $atts ) );

$output =  '<div class="span' . esc_attr($col) . '">' . do_shortcode($content) . '</div>';  

return $output;

add_shortcode("myshortcode", "myshortcode_sc");

is there another function at the return to allow for $output to process the HTML and not just display it as text ?

share|improve this question
up vote 2 down vote accepted

Maybe try replacing

. do_shortcode($content) .

with .$content. ?

Source: http://wp.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/

share|improve this answer

my solution : do_shortcode(html_entity_decode($content)) But not working with ' & " :/

share|improve this answer
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. – Pieter Goosen Feb 26 '15 at 18:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.