In this tutorial we’ll learn how to show a single product of Woocommerce with all the details as on single product page on a custom page of WordPress. We can achieve this with the help of a shortcode.
So first of all create a page where you want to show the product detail. I’ve created a page named welcome with some welcome text on it.
Here is the page I’ve created:
And following is the front end view of this page:
Now let’s say I want to display a product name product 2 on this page.
Here is the product I want to display:
Hover over the product and note its id. In my case it is 9.
Now, add the following shortcode on the newly created content page.
Now, if you’ll go to the content page, you’ll see product details being displayed there as a product page.