I am trying to:
I have looked everywhere but I cannot find a clear solution. I have a content template that loads data from multiple shortcodes and when I am editing the code in the Toolset Content Template Code Editor, when I click on the Update button, it automatically adds paragraph <p> tags and some times <br> line break tags all by itself. If I remove these tags and hit Update again it adds them again. I have looked through all sorts of documentation, but there seems to be no clear solution at the present.
I am using Divi 3.9 at the moment, and am thinking of switching over to Astra theme to save myself the headache of compatibility issues between Divi and Toolset. That said, I need a solution for this issue because it appears in multiple places in many content templates.
I am using the Block Editor as my default editor.
See attached image for reference.
Link to a page where the issue can be seen:
I expected to see:
Instead, I got:
Hello,
I suggest you check these:
1) In the content template, use the WP built-in shortcode block to setup your shortcodes, see WP document:
https://wordpress.org/support/article/shortcode-block/
2) When you display above content template, add attribute suppress_filters='true' into content template shortcode, for example:
[wpv-post-body view_template='my-ct' suppress_filters='true']
More help:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-body
If suppress_filters=’true’, all third party (non WordPress) filters hooked into the_content filter will be removed
My problem is that I have a content template that is assigned to a CPT via the WordPress GUI.
Nowhere in the code of my content template do I have the [wpv-post-body... shortcode. Is there a way I can add a code snippet or modify my functions file with specific code? The extra html tags seem to be triggered by javascript when I click on Update.
Perhaps something like:
<?php remove_filter( 'the_content', 'wpautop' ); the_content(); ?>
You can try the [wpv-noautop] shortcode, see our document:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-noautop
This shortcode disables the auto-paragraph feature for content placed within it.
I ended up finally just changing themes from Divi to Astra and the problem was solved. There just was no other way to work my way around this big issue.