For some time I've experienced difficulties with shortcodes within DMS sections having erroneous <p> tags wrapped around elements, often breaking the code or causing conflicts with the correct short code functioning (often requiring a workaround). I've now realised that this is most probably DMS's application of wpautop.
It seems that the solution to stopping Wordpress adding wpautop to short codes is adding the following lines to functions.php:-
//move wpautop filter to AFTER shortcode is processed remove_filter( 'the_content', 'wpautop' ); add_filter( 'the_content', 'wpautop' , 99); add_filter( 'the_content', 'shortcode_unautop',100 ); However this doesn't work. I'm guessing this is as I am using a child theme of DMS which is overriding the wpautop settings. Can you please reorder wpautop priority in DMS or advise how to stop DMS wrapping short codes with wpautop.