put the remove filter to be called first like this, change your span
to div
or you will have issues with some browsers:
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop' , 12);
function twoColPostcardfn($atts, $content){
extract(shortcode_atts(array(
'image'=>'',
'text'=>'',
'title'=>'',
'boxlink'=>'',
'float'=>''
), $atts));
$bob='<div class="twoColPostcard ">'.$content.'</div>';
return $bob;
}
add_shortcode( 'twoColPostcard', 'twoColPostcardfn' );
or change the content to another span
, the p
tag is a block tag and the span
tag is an inline tag, a block tag cant be inside an inline one.
[twoColPostcard]<span>hello from the first postcard</span>[/twoColPostcard]
[twoColPostcard]<span>hello from the second postcard</span>[/twoColPostcard]