我有一个WordPress页面/Floorplan/正在将一个带有属性method=“post”和action=“/contact/”的表单提交到“/contact/”页面。在我对联系人页面执行任何其他操作之前,我正在var\\u转储$post变量,以确保它是我所期望的,但我没有在$post变量中获取联系人页面,而是获取自定义post类型“floorplan”的实例,该实例对应于在post请求中提交给联系人页面的变量$\\u post[\'floorplan]。发生了什么事?
<!-- /floorplans/ page -->
<form method="post" action="/contact/">
<input type="text" value="example" />
<button>Submit</button>
</form>
<!-- /contact/ page -->
<?php
var_dump($post);
exit;
?>
<!-- Here I expect to see a var dump of the contact page, but instead I get a var dump of the custom post type instance that corresponds to the value that I entered in $_POST[\'floorplan\'], as if this value were a post_name. -->