Limited Support
Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.
Dear Support - Please look at the last answer of this forum thread https://os.me/community/books/question-related-to-kundalini-sadhana/. There are some empty lines injected by unwanted <p> tags. This happens if someone presses enter multiple times while writing their responses.
We want to remove such empty paras while displaying the content on our forum. Could you advice what filter or setting we need to use for the same.
Thanks for your help.
Hi @osdotme
you can remove empty p tags
<p></p>
with this css code
#wpforo #wpforo-wrap .wpforo-post .wpforo-post-content p:empty {display: none;}
but the p tags in your example post are not empty
they contain the html character for "no-break space"
<p> </p>
you can try this jQuery code to remove the tags
add_action( 'wp_head', function () { ?> <script> jQuery(document).ready(function($) { $('.wpforo-post-content p').each(function() { var $this = $(this); if($this.html().replace(/\s| /g, '').length == 0) $this.remove(); }); }); </script> <?php } );