This code enables you to use your own custom loop to display WooCommerce products from any taxonomy including category, tag and custom taxonomies like brand which we use in this case.
The code also enables you to exclude the single product from the loop and remove “out of stock” products.
Easily modify any product parameter to control which product are displayed in your custom loop.
There’s only 1 step :
Copy & paste the PHP code ( without the opening PHP tag ) to the end of your child themes functions file.
By default, the code displays your products after the single product however you can easily change the position by changing the to any other WooCommerce Hook
These solutions may also help :