Skip Navigation

[Resolved] Remove wrapper divs

This thread is resolved. Here is a description of the problem and solution.

Problem:

Views shortcodes and will output a extra HTML div tag, I want to remove the HTML div tag.

Solution:

You can try to remove it with a simple custom shortcode:

https://toolset.com/forums/topic/rawclean-view-output-including-entire-results/#post-377730

And if there are some pagination and search form settings in your view, you can use some CSS codes to style it:

https://toolset.com/forums/topic/rawclean-view-output-including-entire-results/#post-377816

Relevant Documentation:

This support ticket is created 5 years, 12 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by rainman 5 years, 12 months ago.

Assisted by: Luo Yang.

Author
Posts
#806955
output.png

I have a view with this code

<p><strong>Defense Counsel:</strong> [wpv-view name="Attorney in case" attorney="[wpv-post-taxonomy type="attorney-tax" format="text" show="slug"]"]</p>

Instead of generating a single paragraph as written, it generates the first part as a paragraph followed by a div, like this:

<p><strong>MyHeading:</strong></p>
<div id="wpv-view-layout-............">Output</div>

I tried using the answer in this support thread:
https://toolset.com/forums/topic/disabling-new-view-wrapper-div-in-views-2-4-0/#post-531406

But the completely broke the output giving me no page content.

How can I get my output as inline text that will format with the HTML surrounding it?

#808063

Hello,

Yes, You are right, the Views shortcodes <!-- wpv-loop-start --> and <!-- wpv-loop-end --> will output a extra HTML div tag, if you do not need the div tag, you can try to remove it with a simple custom shortcode:
https://toolset.com/forums/topic/rawclean-view-output-including-entire-results/#post-377730

And if there are some pagination and search form settings in your view, you can use some CSS codes to style it:
https://toolset.com/forums/topic/rawclean-view-output-including-entire-results/#post-377816

For your reference.

#841747

Thanks

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.