Skip Navigation

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

This support ticket is created 2 years, 8 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.

Our next available supporter will start replying to tickets in about 2.16 hours from now. Thank you for your understanding.

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+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by nickH-5 2 years, 8 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

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

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!

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