From the course: WordPress: WP-CLI

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Terms and taxonomies

Terms and taxonomies - WordPress Tutorial

From the course: WordPress: WP-CLI

Start my 1-month free trial

Terms and taxonomies

- [Instructor] With WP-CLI you can manage terms and taxonomies adding new ones and attaching them to posts. There are three commands that will help us here taxonomy, term, and post term which can be used to manage individual posts sums. First, it would be good to know a list of all the taxonomies available to us. We can use wp taxonomy list for that. So this will show all of the taxonomies available in our WordPress site. In a site with more content, you might have a different a list. Taxonomies can be added via themes or plugins or even your own functions file. You can see that some of the taxonomies are not public like nav_menu and link_category. If you want to list only the public taxonomies you can use the option public equals 1. And once you know the taxonomies, you can list terms for specific taxonomies. We will do that with the term sub command. So wp term list, and then let's get a list of the categories.…

Contents