Skip Navigation

[Resolved] I need to disable the_content filter in views or content templates in blocks

This support ticket is created 3 years, 5 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: Africa/Casablanca (GMT+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by nickH-5 3 years, 5 months ago.

Assisted by: Jamal.

Author
Posts
#2123905

I am used to using layouts but have moved to Toolset Blocks.

I need to be able to disable the_content filter as a plugin inserts an audio player every time any element of that CPT is shown resulting in multiple audio players in one content template. When elements were inserted in layouts there was a handy checkbox option for this. Am I able to do this with Toolset Blocks?

Thanks

#2124007

Hello and thank you for contacting Toolset support.

Toolset adds hooks to the the_content filter for content templates and when displaying the post's content/body. When using the Single Field block to display the post's content/body, there is an option to suppress filters. But when inserting a content template block, this setting is not available.

You will need to include content templates using a shortcode instead of the content template block. This way, you can pass the  argument. For example:

[wpv-post-body view_template="Name or slug of the content template" suppress_filters="true"]

Read more about the shortcode here https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-body

I hope this helps. Let me know if you have any questions.

#2124207

Thanks; that works!