In this tutorial I shall show how you will dynamically pass the product category slug to [products] shortcode’s category attribute. I build the product categories archive page with Beaver Builder Themer add-on. By default Themer product category archive page is using the Beaver Builder Posts module. I am removing this Posts module and using the HTML module with [products category="product-category-slug"] shortcode.
In the above scenario “product-category-slug” will be replacing with WooCommerce product category slug when user will view the product category archive page. e.g: If user click on product category “Hoodies” link, page will redirect to product category archive page (which is built with beaver themer) and “product-category-slug” will replace with “hoodies” category slug. So user can only see those products which are in “Hoodies” category.
You need small PHP codes for it. You will open the functions.php file of your active theme and add this small piece of codes at end of the file.
The rest of the content is available for Pro members. Click on the PAY NOW button to enable access to this content.
* Payment is non-refundable.