wordpress - 联系Form 7自动添加的p标签

标签 wordpress contact-form-7

我在联系表单7编辑器中有下一个代码

<div class="row">
    <div class="col-sm-8 col-sm-offset-2">
        <div class="row">
            <div class="col-sm-4">
                [text* name class:border-field placeholder "Name"]
            </div><!-- End of col -->
            <div class="col-sm-4">
                [email* email class:border-field placeholder "Email"]
            </div><!-- End of col -->
            <div class="col-sm-4">
                [text subject class:border-field placeholder "Subject"]
            </div><!-- End of col -->
        </div><!-- ENd of row -->
    </div><!-- End of col -->
</div><!-- ENd of row -->

<div class="row">
    <div class="col-sm-8 col-sm-offset-2">
        [textarea message class:border-field placeholder "Message"]
    </div>
</div><!-- End of row -->

<div class="row text-center">
    <div clas s="col-sm-12">    
        [submit class:btn class:btn-black-fill class:btn-small "Submit"]  
    </div><!-- End of col -->
</div><!-- End of row -->

问题在于,它几乎在每个元素之后都添加了随机p标签,并且由于某种原因,第一个文本字段在应该全部内联时,比其他两个字段稍高一些。而且我认为这不是css问题,因为以前我是用平面HTML编写此代码的,并且所有字段都是内联的,所以我认为它一定是联系表单7的东西。

最佳答案

根据Contact Form 7 Docs,您可以通过在wp-config.php中放置以下常量来禁用插件的“wpautop”:

define( 'WPCF7_AUTOP', false );

关于wordpress - 联系Form 7自动添加的p标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32539905/

相关文章:

php - Wordpress Contact Form 7 将 POST 变量传递给感谢页面

css - 将样式添加到无序列表的不同部分,wordpress 小部件

wordpress - 为 Stripe 设置 SSL 证书(在 Wordpress 上)

php - 在 Woocommerce 3+ 中保存并显示订单自定义元数据

wordpress - 如何使用 Contact Form 7 添加 Font Awesome 图标到 WordPress 中的提交按钮?

php - 联系表单 7 提交后无法执行脚本

css - 在保持响应的同时在一行中获取输入字段

php - 在 PHP 中获取 Contact Form 7 表单 ID

php - '1' 数字出现在 wordpress 网站的侧边栏下

php - 您将如何使用元值来模仿此 Google map 查询?