We are building a sales dashboard using Toolset that includes two views working together:
• A Lead View that displays a list of leads (custom post type: lead)
• A Notes View nested inside it (custom post type: note), filtered by the parent lead post
Each lead has an expandable/collapsible section that shows lead details, an inline note submission form, and a rendered list of previous notes (via the nested View).
Everything works and looks perfect except when the first lead in the list has at least one note — in that case, the vertical spacing between the 1st and 2nd lead becomes incorrect, introducing a large visual gap. The layout for all other leads renders cleanly when the first lead has no notes.
⸻
The Problem (visual behavior)
• If no notes exist for the first lead → spacing across all lead rows is perfect.
• As soon as one or more notes exist for the first lead, Toolset inserts extra spacing before the second lead, which appears as a large blank area.
• DOM inspection shows that rogue empty <p></p> tags are being inserted between .lead blocks, even though my Views and HTML include no paragraph tags.
⸻
What I’ve Tried (and ruled out)
We have systematically ruled out the following:
• Cleaned all Toolset Views of extra line breaks and tags
• Wrapped [wpv-view name="lead_notes"...] in <div>s and tried moving it to multiple locations
• Verified that CSS on .lead_note, .lead, .lead-notes-wrapper, and their parents is not introducing any spacing
• Replaced the [wpv-view] shortcode with a custom [lead_notes_clean] PHP shortcode that uses do_shortcode() and strips whitespace via preg_replace
• Used display: contents on wrapper divs to flatten block layout
• Used DevTools to confirm that the space is caused by empty <p></p> tags
• Attempted to remove them via JavaScript after page load (they are removed, but the spacing remains)
• Attempted to use [raw] shortcode (Toolset does not support it)
• Searched for and attempted to disable “Auto-insert paragraphs” in the View UI (this checkbox does not appear, likely due to custom layout usage)
• Attempted wpv_filter_wpv_view_shortcode_output to remove wpautop — this crashed the site
• Tested with and without custom shortcode, suppress_filters, and different loop types
⸻
What I Need Help With
I need Toolset support to help me:
• Identify why Toolset inserts rogue <p> tags or whitespace before/after the first nested view output
• Help me completely suppress automatic formatting or filtering on the nested lead_notes view
• Recommend a supported way to disable wpautop or shortcode_unautop specifically for this view
Hello. Thank you for contacting the Toolset support.
That is really strange.
Can you please share problem URL and admin access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.