2
votes

I want to build a simple ticket system plugin for wordpress. Therefore I need a custom post type. But this post type should only have a post status of "publish" if it was saved. So the entire default meta box for publishing has unnecessary fields. I don't want the post status dropdown nor the visiblity setting field. Curious is that this field is shown even if I set the attribute public to false in the args of register_post_type.

As far as I know the custom post type support isn't fully developed. Maybe this is also an open issue.

However does anybody know if this is possible via the default wordpress publishing meta box or do I need a custom metabox for saving it.

2

2 Answers

1
votes

To do this, unfortunaltely, it's not so easy, so you should:

  1. Remove the submitdiv metabox
  2. Create a new metabox with a different id
  3. Create the callback with an HTML view inspired of the function post_submit_meta_box()
  4. Change your id by submitdiv in jQuery to continue to use post.js correctly

Complete answer here

-1
votes

No, this is wrong:

As far as I know the custom post type support isn't fully developed.

You have full control over configuring everything in the register_post_type function. You must configure what your post type supports and the metabox in the admin will show different options accordingly.

Research: https://codex.wordpress.org/Function_Reference/register_post_type