创建表单和表单不显示

Creating form and form doesn´t show

我正在使用联系表单 7 插件,我创建了表单,然后将生成的代码保存在联系页面中。但是,在预览页面中并没有显示任何形式。

您需要在该 contact-us.php 模板中的某处添加 Wordpress 循环,否则 WP 不会加载您在 WP 编辑器中定义为内容的内容(在您的情况下是内容表单)

您只是错过了要调用的 the_content 函数。请将此代码添加到您的模板文件中,从容器开始到容器结束。请根据您的设计检查 HTML。

<div class="contianer"><!--container start here -->
    <div class="row">
        <!-- map column -->
        <div class="col-lg-8 mb-4">
            <!-- google map iframe goes here -->
        </div>
        <!-- contact details here  -->
        <div class="col-lg-4 mb-4">
            <?php the_content(); ?> 
        </div>
    </div>
</div> <!--container end here -->
<?php endwhile; endif; ?>