I'm now developing on a Wordpress theme.
I have a custom post type named activity
:
register_post_type($class::$post_type, array(
'label' => $class::$post_type_name,
'description' => $class::$post_type_description,
// ....
And I'm editing the single-activity.php
template, I have a form on it:
<form id="form_main" method="post" action="">
<?php wp_nonce_field(); ?>
<!-- Other fields -->
</form>
When I open the url http://localhost/activity/slug/
, the page goes well.
But when I submit the form, i.e. request the url with a post
method, it was causing a 404
response, the url is just simply the same.
What could be the matter?