Woocommerce product as Homepage This is generally required for Ad campaigns and product deal of the day sales, or for sites having a single product or service to highlight the page.
Table of Contents
- Display Single Product Page to a WooCommerce Home Page
Display Single Product Page to a WooCommerce Home Page
You can Display products on a Home Page with the short codes of the Product ID, Simply like
Please change your product id with whatever you wish to display.
If this doesn’t displays, to solve this you can remove the <pre> Tags from the Short Code, Explained here with the Official documentation.
Here is the link if you want to explore Shortcodes included with WooCommerce
Code in your Template
<?php echo do_shortcode('[product_page id="1234"]'); ?>
This Code goes between your header and footer code of the page template for the home page.
Manually with an image and cart shortcode
You can display the same with the image selected from block editor and then below that using the cart short-code
The Result is like this