post_types
configuration contains parameters for registering the custom post types. Configuration files are stored in the includes/configs
subdirectory of HivePress and its extensions. You can retrieve or extend configurations via the HivePress API.{config-name}.php
file (use lowercase letters, numbers, and hyphens only) in the includes/configs
extension subdirectory and HivePress will load it automatically. Pick a name unique enough to avoid conflicts with other HivePress configurations. For this example, we will name it foo-bar.php
.return
statement with an array of parameters:get_config
method with the configuration name:hivepress/v1/{config_name}
filter hook. The code below adds a new array item to the foo_bar
configuration:post-types.php
file in the includes/configs
subdirectory, add an array of post type parameters, and HivePress will register it automatically.