Wp taxonomy list (WP-CLI)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

wp taxonomy list: Get an overview of all available taxonomies

$ wp help taxonomy list

NAME

  wp taxonomy list

DESCRIPTION

  Lists registered taxonomies.

SYNOPSIS

  wp taxonomy list [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>]

OPTIONS

  [--<field>=<value>]
    Filter by one or more fields (see get_taxonomies() first parameter for a list of available fields).

  [--field=<field>]
    Prints the value of a single field for each taxonomy.

  [--fields=<fields>]
    Limit the output to specific taxonomy fields.

  [--format=<format>]
    Render output in a particular format.
    ---
    default: table
    options:
      - table
      - csv
      - json
      - count
      - yaml
    ---

AVAILABLE FIELDS

  These fields will be displayed by default for each term:

  * name
  * label
  * description
  * object_type
  * show_tagcloud
  * hierarchical
  * public

  These fields are optionally available:

  * count

EXAMPLES

    # List all taxonomies.
    $ wp taxonomy list --format=csv
    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,Format,,post,,,1

    # 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      |
    +-------------+--------+

Example - 2022.11

$ 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      |
+------------------+------------------+-------------+------------------------+---------------+--------------+--------+

Example - 2025.03

$ 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               |               |              |        |
| post_format            | Formats                  |             | post                        |               |              | 1      |
| wp_theme               | Themes                   |             | wp_template, ...            |               |              |        |
| wp_template_part_area  | Template Part Areas      |             | wp_template_part            |               |              |        |
| wp_pattern_category    | Pattern Categories       |             | wp_block                    |               |              |        |
| product_brand          | Brands                   |             | product                     | 1             | 1            | 1      |
| product_type           | Product type             |             | product                     |               |              |        |
| product_visibility     | Product visibility       |             | product, product_variation  |               |              |        |
| product_cat            | Product categories       |             | product                     | 1             | 1            | 1      |
| product_tag            | Product tags             |             | product                     | 1             |              | 1      |
| product_shipping_class | Product shipping classes |             | product, product_variation  |               |              | 1      |
| pa_connector           | Product Connector?       |             | product                     | 1             |              |        |
| pa_depth               | Product Depth (mm)       |             | product                     | 1             |              |        |
| pa_device              | Product Device           |             | product                     | 1             |              |        |
| pa_diagram             | Product Diagram          |             | product                     | 1             |              |        |
| pa_length              | Product Length (mm)      |             | product                     | 1             |              |        |
| pa_material            | Product Material         |             | product                     | 1             |              |        |
| pa_model               | Product Model            |             | product                     | 1             |              |        |
| pa_product-line        | Product Product line     |             | product                     | 1             |              |        |
| pa_submodel            | Product Submodel         |             | product                     | 1             |              |        |
| pa_width               | Product Width (mm)       |             | product                     | 1             |              |        |
| cookielawinfo-category | Cookie Category          |             | cookielawinfo               | 1             |              |        |
+------------------------+--------------------------+-------------+-----------------------------+---------------+--------------+--------+