HUSKY - Products Filter Professional for WooCommerce

[woof_products]

插件的第二个主要 shortcode。它允许在 页面 的站点。 shortcode 的所有属性都是可选的。

  • per_page – 每页产品数
  • – how many products per row. Usually it is: 2,3 or 4. 这取决于您的主题能力,而不是 WOOF!
  • is_ajax – 非常强大的选项。您可以将其设置为 1,并且由 [woof] 生成的过滤器将开始以 AJAX 模式运行!
  • 分类 – (可选) – 您可以定义设置分类法及其项的条件。别忘了在 [woof] 中设置相同的条件!
    Example[woof_products is_ajax=1 per_page=8 dp=0 taxonomies=product_cat:9,12+locations:30,31]
  • behavior – 只有一个值:“recent‘。 Example: [woof_products behavior=’recent’ per_page=12 columns=3]
  • orderby – price-desc, price, popularity, rating, title, rand, date
  • 顺序 – ASC 或 DESC
  • custom_tpl – [woof_products custom_tpl=’woof_tpls/woo_tpl_1.php‘ ] – 如果有必要,可以将产品放入特殊自定义模板 (其中 woof_tpls 是 wp 主题文件夹或其子文件夹内的文件夹)。对开发者和高级用户来说是一个很好的功能。
  • tpl_index – [woof_products tpl_index=”tpl_1“] – 如果有必要,可以通过特殊自定义模板输出产品 template OR 连接器 具有自身选项的扩展
  • display_on_search – (从 1.2.2/2.2.2) 仅在搜索进行时显示产品。如果没有搜索请求 – 产品将隐藏(在 ajax 模式下不工作)
  • get_args_only – [woof_products get_args_only=1] – return assembled and prepared array of arguments which is ready for WP_Query request. When this attribute is equal to 1 – no products will out because WP_Query request in this case not done. Use it in the next way for example:
    $args=do_shortcode('[woof_products get_args_only=1 is_ajax=1 per_page=8 taxonomies=product_cat:9,12]');

在 wp_query 之前,插件会运行下一个 wp filter: https://products-filter.com/hook/woof_products_query/ – 有助于处理分类法关系…