Skip to content

Use get_object_taxonomies() for taxonomy list by post type object #181

@grappler

Description

@grappler

I was running the command from the example wp taxonomy list --object_type=post --fields=name,public and could not figure out why all of the taxonomies were not being displayed.

One of the taxonomies that was connected to the "post" object was also associated with other post types. Turns out this is one of the limitations(Core Trac) of get_taxonomies() which is used by wp taxonomy list.

A solution would be to use get_object_taxonomies() instead.

I am not sure what the solution would be here. Perhaps add a different flag or add a new command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions