Skip Navigation

[Resolved] Other plugins are inserting their code into Toolset View loop

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

Problem:
Exclude third party content filters in the view loop

Solution:
Use the suppress_filters="true" argument to the wpv-post-body shortcode in the view template:
[wpv-post-body view_template="loop-item-in-your_view" suppress_filters="true"]

Relevant Documentation:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-153372

This support ticket is created 4 years, 2 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by Shawn 4 years, 2 months ago.

Assisted by: Raja Mohammed.

Author
Posts
#1831291

I've come across this problem with the way several plugins interact with Toolset Views/Blocks. Plugins that use "the_content" hook to insert their code are ending up inserting their code into loop items in Toolset Views as well.

The current problem is the plugin "Grow by Mediavine, Social Pro" which inserts a hidden Pinterest image into every item in the View loop. The View loop in question is included at the bottom of our post page. The View shows 3 other posts from our "Featured" category. You can see an example of this here:

hidden link

Scroll to the featured posts near the bottom and inspect the code for the grid of 3 posts. You'll see a div with the class "dpsp-post-pinterest-image-hidden" inserted once for every item in the View's loop. This hidden div contains the featured image from the parent post (not the post in the View loop) and should not be there, but I don't know how to avoid this with Views.

#1831897

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello there,

By default toolset views allow all the filters hooked to the_content, There is an option to disable all other filters inside toolset views, This can be done by passing the argument suppress_filters="true" to the wpv-post-body shortcode in the view template:
[wpv-post-body view_template="loop-item-in-your_view" suppress_filters="true"]

Reference :https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-153372

I hope this helps better

Regards
Raja

#1832547

That seems to do the trick. Thanks!