The code includes 2 custom WooCommerce product loops which you can display in any position on your single products page. Only unique products are displayed removing duplicates including the current product the loops are displayed on. Out of stock products are also removed.
In this example, the 1st loop is shown before the single product and the 2nd after the single product.
There’s only 1 step :
Copy & paste the PHP code ( excluding the opening PHP tag ) from the functions.php file to the end of your child themes functions file or custom functionality plugin.
These solutions may also help :
Custom Loop for Products In Custom Taxonomy Terms – WooCommerce$75.00
Remove Duplicate Products When Using 2 Loops – WooCommerce$75.00
Custom Loop 1 Before Out of Stock Products & Loop 2 After All Single Products – WooCommerce$75.00
Show Products From Same Taxonomy Term As Single Product – WooCommerce$50.00