How to display html in a shortcode

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

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

Read More

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 ?

Related posts

Leave a Reply

2 comments