We’ve covered how to programmatically create a vocabulary in a previous post. Here’s how to insert a term into our vocabulary, checking to make sure that the term doesn’t already …
If you want your module to create a custom vocabulary, implement hook_install() and hook_uninstall() in your mymodule.install file. The vocabularies will be created and deleted on install/uninstall of the module. …
Creating a custom content type without any fields isn’t really useful. Fortunately, defining your own custom fields and attaching them to your custom content type is built into Drupal 7. …
If you have a custom module and you want to programmatically create a custom content type in Drupal 7, follow the steps below. 1. Implement hook_node_info() Define your new content …