0

how to create content type programatically and attach field api fields to it? hook_node_info() will not work for me since i want to create my node type and its instance in a single method (for testing purposes), so kindly suggest a solution other than hook_node_info(). Thanks

1 Answer 1

0

To create a node type, call node_type_save(). Have a look at the documentation of the Fields API for information on how to attach fields to the node type.

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.