For displaying products that have a specific attribute with WooCommere the
[product_attribute] shortcodes can be used. If your WooCommerce version is lower than 3.2 then you should use the latter.
The appearance of the displayed products depends on your active theme, the following examples are using Chap theme, but the shortcodes work with any theme as long as you’re using WooCommerce.
Displaying WooCommerce products by attribute using the products shortcode
[products attribute="color" filter="black" /]
WooCommerce product attribute shortcode
[product_attribute attribute="color" filter="black" /]
NotesThe old product_attribute shortcode should be used for WooCommerce version 3.1 or lower.