Skip Navigation

[Resolved] Suppress WYSIWYG filters

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

Supporter timezone: Europe/Madrid (GMT+01:00)

This topic contains 8 replies, has 2 voices.

Last updated by nthulaneM 8 years, 4 months ago.

Assisted by: Juan.

Author
Posts
#348328

Hi,

I would like to suppress filter in my WYSIWYG field because I experience multiple instances of plugins because I have multiple WYSIWYG custom fields.

Based on the solution in this post: https://toolset.com/forums/topic/intergration-with-likes-button-plugin/, I pasted this shortcode [wpv-post-body view_template="None" suppress_filters="true"] in my content template but nothing changed, the plugin still appeared twice.

Please help

#348428

Juan
Supporter

Timezone: Europe/Madrid (GMT+01:00)

Hi there

I am not entirely sure I understood your issue, but I think you are talking about Types WYSIWYG fields, right? If that is the case, you do not have to add the shortcode you pasted, just use the attribute suppress_filters="true" on the Types shortcode that displays that WYSIWYG field.

Please check this documentation:
https://toolset.com/documentation/customizing-sites-using-php/functions/#wysiwyg

Let me know if this helps you and if you need further assistance.

Regards.

#348574

Yes, i'm talking about those.

So are you saying that I should paste "[wpv-post-body view_template="None" suppress_filters="true"]" in every WYSIWYG field in every entry of a custom post type? So if i have a custom post type of Artist and it has 3 WYSIWYGs, every time I add an artist to the custom post, i must paste the suppress_filters="true"?

Is there a way of doing it once and not have to do it again?

Please let me know if i'm making sense.

#348582

Juan
Supporter

Timezone: Europe/Madrid (GMT+01:00)

Hi

Mmmm no, not exactly. The [wpv-post-body] shortcode is not related to this at al.

You have YSIWYG Types fields, and they are displayed using [types] shortcodes. The [wpv-post-body] shortcode is used to display the actual post content, not the value of a custom field. In other words, you do not need that shortcode at all to load the field values.

What I am suggesting you is to edit the [types] shortcodes that load a WYSIWYG field add add the suppress_filters="true" attribute to those.

In your case, say you have an Artists custom post type, and it has 3 WYSIWYG fields, say "bio", "career" and "awards". Then, on the shortcodes that you use to show them, you need to add that attribute, to get something like this:

[types field="bio" suppress_filters="true"][/types]
[types field="career" suppress_filters="true"][/types]
[types field="awards" suppress_filters="true"][/types]

Right now there is no way to force this behavior on all WYSIWYG fields, but I am taking this as a feature suggestion. Also, the Types dialog to insert such fields does not offer the option to add this attribute, so you have to do it manually (and I add another feature suggestion for it).

Let me know if you need further help or if I can help you with anything else 🙂

Regards.

#348769
Screen Shot 2015-11-20 at 11.05.51 AM.png

Hi Juan,

Thanks for your advice, it works.

I have a succeeding question though. So we create a custom post(artist) type and fields(bio, career, awards). Then we want to add a new artist in the admin area, wordpress already has its own WYSIWYG text area(other than the custom fields), this also has an instance of a plugin. Is there a way to suppress this WYSIWYG? I hope the image helps.

#348800

Juan
Supporter

Timezone: Europe/Madrid (GMT+01:00)

types-disable-editor-in-cpt.png

Hi there

Yes, it is posible and easy 🙂 If you created the Custom Post Type "Artist" with Types, go to Types -> Post Types and edit it. You need to find the Custom Post Properties section, and inside it the Editor chckbox. If you uncheck it, when you add or edit an artist, the native WordPress WYSIWYG editor textarea will not be displayed. See attached screenshot.

Hope it helps.

Let me know if you need further help or if I can help you with anything else.

Regards.

#348818

Juan, thank you for that. It was very helpful. So I disabled the "editor" in the Types->Post Types process but the plugin still shows itself even though there is no WYSIWYG editor.
I thought that removing the editor would remove the plugin showing itself.

How can I fix this?

The plugin is Rating Widget.

#348822

Juan
Supporter

Timezone: Europe/Madrid (GMT+01:00)

Hi there

Oh, sorry, I think I missunderstood you. I thought you wanted to remove the editor just from the backend. OK, here is the thing: even without the WordPress WYSIWYG editor in the backend, it is your theme the one that makes the display in the frontend, and somewhere it must be calling the post content. That third party plugin is hooking into that content being displayed. Although the content itself is empty, the plugin is adding its output to it.

I am sorry, there might not be an easy way to disable this without messing with that third party plugin code. I tried to install it on my local to check whether it offers any way to disable this on a post type basis, and I could not see any trace of it in its code. I could not also use it, since it is a plugin-as-a-service and requires an account on this third party provider.

I suggest you to get in touch with their support here:
hidden link
or here:
https://wordpress.org/support/plugin/rating-widget
and check whether there is a solution for your issue.

PLease let me know if there is anything else I can help you with.

Regards.

#348888

Don't worry about it Juan. You have been a very great help even if this part can't be easily sorted. I appreciate your enthusiasm and emoticons.

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