Functions

All of the following functions take an optional array as their function argument, holding options equivalent to those that the Shortcodes allow. Please refer to documentation of the corresponding shortcode for details on the accepted attributes.

All functions return a string which can be used to render the corresponding HTML in a PHP template.

woocommerce_product_search() ↑ Back to top

Renders a product search form which is returned as HTML and loads required resources.

woocommerce_product_filter() ↑ Back to top

Renders a product filter form which is returned as HTML and loads required resources.

This should be used with the woocommerce_product_filter_products() function which provides the target where the results of the live filter are displayed.

woocommerce_product_filter_products() ↑ Back to top

Renders the products section based on the shop loop. This should be used only once on a page to render the target where the results of the live filters are displayed.

woocommerce_product_search_filter_attribute() ↑ Back to top

Renders a product attribute filter which is returned as HTML and loads required resources.

This should be used with the woocommerce_product_filter_products() function which provides the target where the results of the live filter are displayed.

woocommerce_product_search_filter_category() ↑ Back to top

Renders a product category filter which is returned as HTML and loads required resources.

This should be used with the woocommerce_product_filter_products() function which provides the target where the results of the live filter are displayed.

woocommerce_product_search_filter_price() ↑ Back to top

Renders a product price filter which is returned as HTML and loads required resources.

This should be used with the woocommerce_product_filter_products() function which provides the target where the results of the live filter are displayed.

woocommerce_product_search_filter_tag() ↑ Back to top

Renders a product tag filter which is returned as HTML and loads required resources.

This should be used with the woocommerce_product_filter_products() function which provides the target where the results of the live filter are displayed.

woocommerce_product_search_filter_reset() ↑ Back to top

Renders a button to reset all live filters, returned as HTML.

Use it with live product filters to provide a convenient means of clearing all active filters.

WooCommerce - the most customizable eCommerce platform for building your online business.

Back to the top