WooCommerce is a free plugin that can be easily installed just like any other WordPress plugin. You can use WooCommerce shortcode to display products on homepage.
WooCommerce comes with several shortcodes that can be used to insert content into posts and pages.
The below shortcode show Recent Products. The ‘per_page’ shortcode determines how many products to show on the page and the columns attribute controls how many columns wide the products should be before wrapping.
[recent_products per_page="12" columns="4"]
Works the same as recent products but displays products that have been set as “featured.” In this example, the shortcode is saying: Show 12 featured products in 4 columns.
[featured_products per_page="12" columns="4"]
Show Product by ID or SKU
The below Shortcode show products by SKU or ID .
Show a single product by ID or SKU.
[product id="99"] [product sku="FOO"]
Show multiple products by ID or SKU. Make note of the plural ‘products.’
[products ids="1, 2, 3, 4, 5"] [products skus="foo, bar, baz" orderby="date" order="desc"]
On Sale Products
The below Shortcode show the products which are on Sale.
The below Shortcode show the best-selling products.
The below Shortcode show the products of the particular category on the homepage.
I hope you like this post, Please feel free to comment below, your suggestion and problems!