1

New to registering post types but looking at samples, and the codex not helpful here. I am not understanding how the two of these relate?

This is just bare bones so someone can explain (the parameter that does this?).

register_post_type('book');
register_post_type('car');
register_post_type('seeds');

register_post_status('start');
register_post_status('growing');

How do i declare that the "start" status is for the "car" and that the "growing" is for "seeds" and that neither status should be applied to "books"?

1 Answer 1

0

They don't do this. Custom post statuses are basically a trap. They seem like they might make sense, but likely they won't do what you think they will do and cause ton of grief with edge cases on top.

You should consider custom taxonomies for your CPT–specific data. They are much more robust and safe to use for something like this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.