Skip Navigation

[Resolved] Extra LearnDash tags in WYSIWYG fields in Toolset views

This support ticket is created 4 years, 1 month 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. 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: Asia/Karachi (GMT+05:00)

This topic contains 6 replies, has 3 voices.

Last updated by collinC-2 4 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#1784801

I'm using Toolset to create a custom view for LearnDash lessons. My client has added a lot of custom fields to the Lession CPT. When I use a WYSIWYG fields in my view, I get a lot of LearnDash tags wrapped around my Toolset content. This breaks the formatting of

The accordion headers are the ones that have the extra content: hidden link. Do you know where the extra content might be coming from?

Please let me know if I can provide more information on my issue.

Thank you.

#1786377

Hello, have you tried the suppress_filters attribute? It will prevent third-party filters from manipulating the contents of a WYSIWYG field. For example:

[types field="your-wysiwyg" suppress_filters="true"][/types]
#1786653

I gave that a try and it's still being wrapped in divs that have learndash-* in the IDs and classes. Anything else I can try on the Toolset end? Thanks!

#1787725

There is also a suppress_filters attribute on the wpv-post-body shortcode, if you're using one of those to display the information in a Content Template: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-body

Right now I can't really see anything, since it's all behind a login. It's difficult for me to guess without being able to see how everything is put together. Would you like to provide login credentials so I can take a closer look?

#1793227

Christian,

I've got a little more detail for you about this issue. It looks like the extra LearnDash code is being wrapped around WYSIWYG fields using [types field=fieldname'][/types] shortcodes. If you look at the first section (Learning Objectives) on hidden link, the first block of text is from the wpv-post-body shortcode. When I add the suppress_filters="true" attribute to that shortcode, the extra LearnDash code is not added.

The Theme, Counting, and Site Words are single line fields. No extra LearnDash code is added to these types of fields. Images also don't appear to have extra code as well.

The Transition field is a WYSIWYG field. It adds the LearnDash code around it so that the Mark Complete button is prematurely shown. I've tried adding the suppress_filters="true" attribute to the [types] shortcode but the extra LearnDash code is still wrapped around it.

Please let me know if that helps.

Thanks,

Collin

#1796393

Hi Collin,

Thanks for writing back and for sharing these details.

As Christian is on vacation, I'll be following up on this ticket.

The user that you've shared doesn't seem to have the "administrator" role, so I'm not able to see how shortcodes and the content of these fields are added in the backend.

Have you tried the WYSIWYG field's shortcode with the "output" attribute set to "raw"?
( ref: https://toolset.com/documentation/customizing-sites-using-php/functions/#wysiwyg )

Example:


[types field="fieldname" output="raw"][/types]

In case the extra HTML is still being wrapped around the field, please change the role of the user that you've shared earlier to "administrator", so that I can see how everything set up and perform some tests on my own website, accordingly.

regards,
Waqar

#1796785

My apologies for the wrong permissions. I think your fix did the trick for me though. My issue is resolved now. Thank you!