Custom Post Types aren't created
-
Hi,
I am experiencing and odd issue with custom post types.
I am using my own form.
I have created a custom post type (both using the types plugin and via functions.php)
I have a form field called ‘post_type’
When I put post/page or any random string of chars in to this field a post or page is created. With the random string a post is created.
If I put the custom post type in the field everything fails. My theme defaults to an ‘oops can’t find this page’ on form submit. (I have yet to try the default themes).
If I use the fix suggested in a previous comment:
$post = array(
‘post_status’ => ‘publish’,
‘post_type’ => ‘testimonial‘,
‘post_category’ => array(0)
);
removing the post_type field and everything works as expected.I haven’t been able to try the logging suggested in the previous post, I will try this tomorrow.
Does any one have a better fix? I don’t want to lock this down to one custom post type.
Thanks
John
- The topic ‘Custom Post Types aren't created’ is closed to new replies.