Wp taxonomy (WP-CLI)
Naar navigatie springen
Naar zoeken springen
Met wp taxonomy kun je informatie opvragen over taxononomieën, maar niet wijzigen. Dat laatste kan wel met bijvoorbeeld wp term
, en diverse wp wc
-subcommando's.
wp help taxonomy wp taxonomy DESCRIPTION Retrieves information about registered taxonomies. SYNOPSIS wp taxonomy <command> SUBCOMMANDS get Gets details about a registered taxonomy. list Lists registered taxonomies. See references for [built-in taxonomies][1] and [custom taxonomies][2]. --- [1] https://developer.wordpress.org/themes/basics/categories-tags-custom-taxonomies/ [2] https://developer.wordpress.org/plugins/taxonomies/working-with-custom-taxonomies/ EXAMPLES # List all taxonomies with 'post' object type. $ wp taxonomy list --object_type=post --fields=name,public +-------------+--------+ | name | public | +-------------+--------+ | category | 1 | | post_tag | 1 | | post_format | 1 | +-------------+--------+ # Get capabilities of 'post_tag' taxonomy. $ wp taxonomy get post_tag --field=cap {"manage_terms":"manage_categories","edit_terms":"manage_categories","delete_terms":"manage_categories","assign_terms":"edit_posts"}
wp taxonomy get
wp taxonomy list
Krijg een overzicht van taxonomieën.
Voorbeeld (impressie):
wp taxonomy list +------------------+------------------+-------------+------------------------+---------------+--------------+--------+ | name | label | description | object_type | show_tagcloud | hierarchical | public | +------------------+------------------+-------------+------------------------+---------------+--------------+--------+ | category | Categories | | post | 1 | 1 | 1 | | post_tag | Tags | | post | 1 | | 1 | | nav_menu | Navigation Menus | | nav_menu_item | | | | | link_category | Link Categories | | link | 1 | | | | post_format | Formats | | post | | | 1 | | wp_theme | Themes | | wp_template | | | | | product_type | Product type | | product | | | | | product_visibili | Product visibili | | product, product_varia | | | | | ty | ty | | tion | | | | | product_cat | Product categori | | product | 1 | 1 | 1 | | | es | | | | | | | product_tag | Product tags | | product | 1 | | 1 | | product_shipping | Product shipping | | product, product_varia | | | 1 | | _class | classes | | tion | | | | | pa_apparaat | Product Apparaat | | product | 1 | | 1 | | pa_as_code | Product As-code | | product | 1 | | 1 | | pa_stop | Product stop? | | product | 1 | | 1 | +------------------+------------------+-------------+------------------------+---------------+--------------+--------+