prevent shortcode being wrapped in p tags
-
When using a shortcode in slide content, the resulting output gets wrapped in paragraph tags, presumably by wpautop, but doesn’t have the tags removed by shortcode_unautop. My shortcode function is called twice – from two shortcodes. The first starts a div to go before content, the second closes the div after the content.
The result is that I get:
<p><div></p> content goes here <p></div></p>
whereas I should get:
<div> content </div>
There are lots of results for a “remove unwanted p tags wordpress” search but none of the solutions work in this case, because the shortcode is nested inside Slide Anything’s shortcode.
Any ideas welcomed…
thanks,
Martin
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘prevent shortcode being wrapped in p tags’ is closed to new replies.