I have a shortcode for a blockquote [blockquote]this is the quote[/blockquote]
... this is the code.
function shortcode_shortcodetest( $atts, $content = null ) {
$return = '<div class="blockquotewrapper"><blockquote>';
$return .= do_shortcode( $content );
$return .= '</blockquote>';
$return .= '</div>';
return $return;
}
add_shortcode( 'shortcodetest', 'shortcode_shortcodetest' );
so I would be expecting an output of:
<div class="blockquotewrapper">
<blockquote><p>this is a test</p></blockquote>
</div>
or maybe
<div class="blockquotewrapper">
<blockquote>this is a test</blockquote>
</div>
but what I get is:
<div class="blockquotewrapper">
<blockquote>this is a test<p></p></blockquote>
</div>
( note posision of opening paragraph tag )
What is causing the opening p
tag to move to where it does. I have noticed that if I remove either the div
or blockquote
from the shortcode function then it doesn't happen, but I wanted to have the wrapper for some styling reasons and because in the full version I have an associated cite possibility ... and obviously I need to have the blockquote.