[Resolved] Disabling new View wrapper div in Views >= 1.11
This thread is resolved. Here is a description of the problem and solution.
Problem:
The issue here is that a new wrapper div has been added to views since the latest 1.11 update. This additional div is causing issues for some customers and they would like to know how to remove it.
Solution:
To resolve this issue you need to add the following code to your theme's functions.php file.
The problem is that the solution applies to all instances of a given view.
Can you help me adapt this solution to work based on a parameter passed in the shortcode so that I can selectively disable the wrapper div?
e.g.
[wpv-view name="my-view" disable-wrap="true"]
On a different note, are there plans to integrate this functionality into Views? I'd either expect the View to automatically render without the div if it's not using paging/filtering etc. or have the option to disable it (which can then force disable paging/filtering to ensure consistent behaviour).
FYI, this change has caused a lot of CSS/JQuery related issues on my sites. I've also had clients looking at the HTML source asking my what all the "ugly" code is for when there is not functionality on the page that requires it.
Admittedly, I'm not too happy with the string manipulation approach here.
Please let me know if there's a more reliable alternative to this function, and whether (when) this functionality will be included on the Toolset front-end.
I must apologize for the extensive delay in my response.
This has been something that many of our customers has been asking for a similar solution so this would definitely be a solution that our other customers can use.
However due to the complaints we have been getting about this our developers have decided to add a new option to our views plugin to remove this from the view output.
This feature will be implemented in one of our future releases.
So you need not to worry because a solution is on the way.
Hello,
i'm curious about this wrapper also... i'm completely stuck by the wrapper divs... i'm displauing a grid of views... but also empty views take space because of the view wrapper. It has been a year since @shane-c mentioned this... any progress?
I am very unhappy that this is still a problem and that the documented workarounds, which have all been put forward by members of the Toolset Community, no longer seem to work
I just don't understand why On The Go can't give us a proper solution to disabling all this often unnecessary output...
I also need to remove the wrapper around the loop items. I get why it's there and what it's used for. I still have an instance that requires its removal.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.