We get asked this a lot, “How do you display a list of products using a tag with the WooCommerce shortcode?” it is a good question as the WooCommerce documentation on shortcodes doesn’t seem to mention much about product tags. It is actually very easy to list products that have a certain tag using the standard “[products]” shortcode.
All you need to do is include the identifier tag="YOUR-TAG-SLUG"
with the standard product’s shortcode. As so ‘[products tag=”gifts”]‘, this would display a list of the products with the tag ‘Gifts’.
Live example of the use of “[products]” shortcode.
Some common shortcode in WooCommerce:
‘woocommerce_cart‘
Used on the cart page, the cart shortcode displays cart content and interface for coupon codes and other cart bits and pieces.
‘woocommerce_checkout‘
Used on the checkout page, the checkout shortcode displays the checkout process.
‘woocommerce_my_account‘
Shows the ‘my account’ section where the customer can view past orders and update their information. You can specify the number of orders to show. By default, it’s set to 15 (use -1 to display all orders.)
‘woocommerce_order_tracking‘
Lets a user see the status of an order by entering their order details.
I hope you found this helpful!
For more information on changing display products using Tag with WooCommerce Shortcode, let us help you accordingly, from start to finish, with one-Time fixes, custom plans, or monthly routines for your WordPress website.