I am creating a plugin that registers a Custom Post Type. Let’s call it “Cars”. I am looking to be able to add custom fields(or metaboxes) when I am editing a car, just like what you can do now with a custom field in a post or a CPT but I want to be able to control the HTML/CSS for it(for example I would like it to have 3 input fields).
So for example when you are editing a car, there would be a “add new field” button and when you press it a new custom field/metabox(with predefined structure and styling by me) would be added.
Let me know if I am not clear. Thank you!
To add a metabox to a post type
car
use the proper hook:The content will be created in your callback: