A shortcode to display products by a custom taxonomy.
Author: | Elvis Morales (profile at wordpress.org) |
WordPress version required: | 3.5 |
WordPress version tested: | 4.7.17 |
Plugin version: | 2.2 |
Added to WordPress repository: | 01-04-2015 |
Last updated: | 20-03-2017
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 100 |
Rated by: | 3 |
Plugin URI: | http://elvismdev.github.io/woocommerce-produc... |
Total downloads: | 3 554 |
Active installs: | 100+ |
Click to start download |
Shortcodes included with WooCommerce lacks on the possibility to display products in post or pages filtering them by a custom taxonomy type.
For example in the scenario where we have a custom taxonomy type for products which is called Vendors and this one contains Apple, Samsung, LG, Motorola, Microsoft, … as taxonomy tags elements. If we like to display only the products by Apple in a page or post, here this odd tweak plugin comes to the rescue.
Usage
[woo_products_custom_tax tax_name="vendor" tax_tags="apple" columns="4" template="product" qty="10" order="DESC"]
Attributes
- tax_name (string) (required): The custom taxonomy slug.
- tax_tags (string) (required): The custom taxonomy tags slug. Accepts also multiple tags as an array separated by comma (tax_tags=”apple,samsung”).
- columns (integer) (optional, default = 4): The ammount of products/colums to display per row.
- template (string) (optional, default = “product”): Specifies the WooCommerce template file to use for displaying products. e.g. Instead of loading the default file
/wp-content/plugins/woocommerce/templates/content-product.php
you might want to use your custom template override file/wp-content/themes/twentyfifteen/woocommerce/content-my-custom-product-file.php
. For this case you can load the template like (template=”my-custom-product-file”). - qty (integer) (optional, default = 10): The max ammount of products to display per page/output.
- order (string) (optional, default = ‘DESC’): The order of products to display per page/output. ‘ASC’ – ascending order from lowest to highest values. ‘DESC’ – descending order from highest to lowest values.
Pagination
For pagination support please install Shortcode Pagination for WooCommerce.
Pull requests for fixes, new features and enhancements are welcome on GitHub
Screenshots
FAQ
ChangeLog