Content of the article
Second main shortcode of the plugin. Its allows out products on pages of the site. All attributes of the shortcode is optional.
- per_page - products per page
- columns - how many products per row. Usually it is: 2,3 or 4. It depends of your theme ability and not from the WOOF!
- is_ajax - very power option. You can set it to 1 and your filter generated by [woof] will start works in AJAX mode!
- taxonomies - (optional) - you can define condition where set taxonomy and its term. Do not forget set the same condition in [woof]!
Example: [woof_products is_ajax=1 per_page=8 dp=0 taxonomies=product_cat:9,12+locations:30,31]
- behavior - only one value: 'recent'. Example: [woof_products behavior='recent' per_page=12 columns=3]
- orderby - price-desc, price, popularity, rating, title, rand, date
- order - ASC or DESC
- custom_tpl - [woof_products custom_tpl='woof_tpls/woo_tpl_1.php' ] - if its necessary its possible out products in special custom template (where woof_tpls is folder inside wp theme folder or its child folder). Good feature for developers and advanced users.
- tpl_index - [woof_products tpl_index="tpl_1"] - if its necessary its possible out products in special custom template created by template OR connector extension with its own options
- 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:PHP1$args=do_shortcode('[woof_products get_args_only=1 is_ajax=1 per_page=8 taxonomies=product_cat:9,12]');
In the plugin before wp_query works next wp filter: https://www.woocommerce-filter.com/hook/woof_products_query/ - useful for manipulations with taxonomies relations ...