Skip Navigation

[Resolved] Post content field parameter format=”noautop” not working

This thread is resolved. Here is a description of the problem and solution.

Problem:
The "noautop" for Post Content does not work.
It still outputs formatted content.

Solution:
The ShortCode wpv-post-body does not have a "format" attribute.
The attribute does not exist, and should not be used in this ShortCode.

The Post body ShortCode instead supports the following attributes:
'view_template' => The name of a Content template to use when displaying the post content.
'suppress_filters' => Returns the post body with just the natural WordPress filters applied
'output' => [ normal | raw | inherit ]

This last one works only if view_template="None" and will produce the Post Body with wpautop, without wpautop or inherited from the parent Template when applicable

Hence this is the attribute you want to use:
output="raw"

This support ticket is created 6 years, 9 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 2 replies, has 2 voices.

Last updated by Nicholas 6 years, 9 months ago.

Assisted by: Beda.

Author
Posts
#616957
Screen Shot 2018-02-17 at 11.10.33 AM.png

So I tried the following in order to avoid getting the post content wrapped in a <p> tag

[cred_generic_field field='post_content' type='textarea' class='sfc-campaign-new-input' urlparam='']
{
"required":1,
"validate_format":0,
"default":"[wpv-post-body view_template="None" format="noautop" id="[wpv-search-term param='post_id']" suppress_filters="true"]",
"persist":1
}
[/cred_generic_field]

Even though I used the parameter format="noautop" the content is still wrapped inside of a <p> tag (screenshot)

#617000

The ShortCode wpv-post-body does not have a "format" attribute.

Please can you share with me where you found this information, or how you got it produced by our ShortCode GUI?
The attribute does not exist, and should not be used in this ShortCode.
I would have to report any DOC or GUI that would suggest to use it.

The ShortCode instead supports the following attributes:
'view_template' => The name of a Content template to use when displaying the post content.
'suppress_filters' => Returns the post body with just the natural WordPress filters applied
'output' => [ normal | raw | inherit ]
This last one works only if view_template="None" and will produce the Post Body with wpautop, without wpautop or inherited from the parent Template when applicable

Hence this is the attribute you want to use:
output="raw"

#617021

Thank you, Beda. I confused it with the post_excerpt field. This is solved.