WooCommerce

WooCommerce: Display Products on Homepage

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.

Recent Products

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"]

Featured Products

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.

[sale_products per_page="12"]

Best-Selling Products

The below Shortcode show the best-selling products.

best_selling_products per_page="12"]

Product Category

The below Shortcode show the products of the particular category on the homepage.

[product_category category="appliances"]

I hope you like this post, Please feel free to comment below, your suggestion and problems!

(Visited 17 times, 1 visits today)
Chandra Kumar

Hello World, I am Chandra Kumar from New Delhi, India. I am professionally developer, programmer and blogger. I am the founder of WebShouters.com.

0 Comment

Leave a Comment

Your email address will not be published. Required fields are marked *