【发布时间】:2016-05-08 03:38:16
【问题描述】:
我现在正在开发一个 Wordpress 主题。
我有一个名为 activity 的自定义帖子类型:
register_post_type($class::$post_type, array(
'label' => $class::$post_type_name,
'description' => $class::$post_type_description,
// ....
我正在编辑single-activity.php 模板,上面有一个表单:
<form id="form_main" method="post" action="">
<?php wp_nonce_field(); ?>
<!-- Other fields -->
</form>
当我打开网址http://localhost/activity/slug/时,页面运行良好。
但是当我提交表单时,即使用 post 方法请求 url,它会导致 404 响应,url 只是一样。
怎么回事?
【问题讨论】:
标签: php wordpress wordpress-theming custom-post-type