Hi,
I have noticed that many shortcodes such as heading, accordion, notes, also automatically include paragraph tags before and after. How can I remove these?
for example, typically heading shortcode resolves into something like this
< p > .... < / p>
<h 3 class = " heading " > .. < / h 3 >
< p > .... < / p>
Yes, and in some cases the P tags cause an issue such as the tabs shortcode.
A quick fix is to remove these from the editor - text mode.
Sometimes even that doesn't help. Especially if the two shortcodes are used back to back such as say [accordion]xyz[/accordion][heading]abc[/heading] the paragraph is somehow introduced in between or right after.
There is solution for this but this will apply Globally in the site .
refer :
https://codex.wordpress.org/Function_Reference/wpautop#Notes
Thanks, I will give it a try.