In this part of the tutorial, we show how to add custom fields and custom taxonomy to WooCommerce products. We will use these custom attributes to organize our products and add more information to them.
WooCommerce creates the products custom post type for us. We’ll use Types to customize the products by adding our own custom fields and taxonomy to them. Later in the tutorial, we’ll show how to display these new product attributes using Views plugin.
Here is the customized WooCommerce product edit screen:
It includes the standard WooCommerce elements, such as title, body and product settings. We use Types to add our custom fields and include them in the WordPress admin. Later, we’ll show you how to use Views to create custom templates for WooCommerce products and develop parametric product searches.
We want to allow to add styles to products. For that, we’ll use custom fields. Here is how to do that:
Types lets us add image custom fields. Types image fields are powerful and easy to use. You can upload one image and use it to display the product in different sizes. We’ll make the product-image custom field ‘repeating’, so that we can upload a number of images to the same product, creating a mini product-gallery.
The most effective way to create a Gender box for all of our products is with Custom Taxonomy. Since products belong to some (or multiple) genders, taxonomy is the natural way to add this information.
By adding WooCommerce Views to our site, not only have we added all the shortcodes we need to display our Products, we’ve also added ‘complex’ product fields for you to use in Views to filter you product queries or to conditional display sections of your views.
You can read more about these fields and other functionality, in WooCommerce Views – build e-commerce sites with Toolset.
In this step, we’ve added custom fields to products and organized products using taxonomy. Now, we can manage the store from the WordPress admin. In the next parts, we’ll see how to build the public pages that display all this information. You guessed right. We’ll do that with Views, all from the WordPress admin and without any coding.