简体   繁体   English

联系表格 7:scope 中没有 p 元素,但看到了 ap 结束标记

[英]Contact Form 7 : No p element in scope but a p end tag seen

I am using contact form 7 plugin on my website.我在我的网站上使用联系表格 7 插件。 Plugin shortcode generated spaces, new lines, and p tags, which w3 validator say there is not a right.插件简码生成了空格、换行符和 p 标签,w3 验证器说这不正确。

how I can change the template or fix it with other ways我如何更改模板或用其他方式修复它

在此处输入图像描述

在此处输入图像描述

the simple way is that add add_filter('wpcf7_autop_or_not', '__return_false');简单的方法是添加add_filter('wpcf7_autop_or_not', '__return_false'); in your functions.php在你的functions.php

another way is to modify/edit your form and remove all your \\n (new line characters).另一种方法是修改/编辑您的表单并删除所有\\n (换行符)。

you can also add this to your wp-config.php您也可以将其添加到您的 wp-config.php

define( 'WPCF7_AUTOP', false );

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM