Posted on November 25, 2016

The Taxonomies config module helps you to register and manipulate WordPress txonomies.

Default config path

{{ Project dir }}/app/config/taxonomies.json

You can rewrite this path by lf_config_taxonomies_path filter.

Item arguments

singular (string) (Required) Name for one object of this taxonomies. From this will be generated plural and slug argument if you don’t specify.

plural (string) (Optional) Name for few object of this taxonomy.

slug (string) (optional) The name of the taxonomy. Name should only contain lowercase letters and the underscore character, and not be more than 32 characters long (database structure restriction). Default: None

object_type (array/string) (required) Name of the object type for the taxonomy object. Object-types can be built-in Post Type or any Custom Post Type that may be registered. Default: None Built-in Post Types:

  • post
  • page
  • attachment
  • revision
  • nav_menu_item

    #### Custom Post Types:

  • {custom_post_type} – Custom Post Type names must be all in lower-case and without any spaces.
  • null – Setting explicitly to null registers the taxonomy but doesn’t associate it with any objects, so it won’t be directly available within the Admin UI. You will need to manually register it using the ‘taxonomy’ parameter (passed through $args) when registering a custom post_type (see register_post_type()), or using register_taxonomy_for_object_type().
    args (array/string) (optional) An array of Arguments. Default: None

Based on

<?php register_taxonomy( $taxonomy, $object_type, $args ); ?> 


Leave a Reply

Your email address will not be published. Required fields are marked *