Displaying your WooCommerce products on your homepage is a fantastic way to grab visitors’ attention and drive sales right from the start. With WooCommerce’s built-in shortcodes, you can showcase products without needing extra plugins, giving you full control over how they appear. In this beginner-friendly guide, we’ll walk you through how to add products to your homepage using shortcodes, customize their display, and highlight specific categories, sales, or new arrivals.
Why Display Products on Your Homepage?
Your homepage is often the first impression customers get of your store. Featuring products front and center can:
- Boost Engagement: Entice visitors to explore your catalog.
- Highlight Promotions: Showcase sales, new arrivals, or bestsellers.
- Improve Conversions: Make it easy for customers to add items to their cart.
- Customize Layouts: Tailor the look with columns, categories, and more.
Best of all, WooCommerce’s shortcodes work with any page builder (Elementor, Divi, Gutenberg, etc.), so you can seamlessly integrate products into your design.
Step-by-Step Guide to Adding Products on Your Homepage
1. Set Up Your Page Builder
To get started, you’ll need to edit your homepage using a page builder or the WordPress editor.
- Log in to WordPress and navigate to Pages > Edit your homepage (or create a new one).
- Enable Your Page Builder:
- If you’re using Gutenberg, add a block.
- For builders like Elementor or Divi, open the page in the editor.
- Shortcodes work with all builders, so choose what you’re comfortable with.
- Find the Right Spot: Decide where you want your products to appear (e.g., below a hero banner or between sections like “New Arrivals” and “Explore All Products”).
2. Add a Shortcode Widget
WooCommerce shortcodes let you display products dynamically. You’ll use a shortcode widget (or a text editor) to insert them.
- Add a Shortcode Widget:
- In your page builder, drag a Shortcode Widget (or Shortcode Block in Gutenberg) to your desired section.
- If your builder doesn’t have a shortcode widget, use a Text Editor Widget, paste the shortcode, and it’ll work the same way.
- Prepare to Enter the Shortcode:
- Click into the shortcode field to start typing.
3. Use Basic Shortcodes to Display Products
Let’s begin with a simple shortcode to display a set number of products in a grid.
- Set the Number of Products:
- Use the products shortcode with a limit attribute to control how many products show.
- Example: To show 8 products, enter: textCollapseWrapCopy
[products limit=\"8\"]
- Adjust Columns:
- Add the columns attribute to define the grid layout.
- Example: For 8 products in 4 columns (2 rows of 4), use: textCollapseWrapCopy
[products limit=\"8\" columns=\"4\"]
- Preview the Result:
- Save or update your page, and you’ll see 8 products displayed in a 4-column grid.
- Tweak as needed. For example, try [products limit=\”4\” columns=\”2\”] for 4 products in 2 columns.
4. Customize Product Displays
WooCommerce shortcodes offer flexibility to showcase specific products. Here are popular options:
- Display by Category:
- Highlight products from a specific category (e.g., “Home Decor”).
- Check your WooCommerce categories under Products > Categories to get the exact name.
- Example: For a “Home Decor” category, use: textCollapseWrapCopy
[products limit=\"8\" columns=\"4\" category=\"home-decor\"]
- Note: The category name must match exactly, including hyphens for spaces (e.g., “home-decor” for “Home Decor”). Misspellings will show no products.
- Show Newest Products:
- Feature your latest additions under a “New Arrivals” section.
- Use the order attribute with DESC (descending) to sort by newest first.
- Example: textCollapseWrapCopy
[products limit=\"8\" columns=\"4\" order=\"DESC\"]
- Highlight On-Sale Products:
- Promote discounted items to drive urgency.
- Use the on_sale attribute set to true.
- Example: For 4 on-sale products in 4 columns, use: textCollapseWrapCopy
[products limit=\"4\" columns=\"4\" on_sale=\"true\"]
- Feature Bestsellers or Popular Products:
- Show top-performing products with orderby=\”popularity\”.
- Example: textCollapseWrapCopy
[products limit=\"6\" columns=\"3\" orderby=\"popularity\"]
- Note: Bestseller shortcodes like [best_selling_products] require sales data to display products. If your store is new with no sales, these may show nothing.
5. Explore Advanced Shortcodes
WooCommerce offers many shortcodes for unique displays. Here are a few to try:
- Featured Products: textCollapseWrapCopy
[featured_products limit=\"4\" columns=\"4\"]
- Recent Products: textCollapseWrapCopy
[recent_products limit=\"6\" columns=\"3\"]
- Products by Tag: textCollapseWrapCopy
[products limit=\"8\" columns=\"4\" tag=\"summer\"]
- Random Sale Items: textCollapseWrapCopy
[products limit=\"4\" columns=\"4\" on_sale=\"true\" orderby=\"rand\"]
Find more examples in WooCommerce’s shortcode documentation. While the documentation can be technical, it lists options like carts, checkouts, and order tracking, plus product-specific commands.
6. Test and Style Your Display
- Preview Your Homepage:
- Save your changes and visit your site to see the products live.
- Ensure they align with your design (e.g., spacing, font sizes).
- Adjust Styling:
- Use your page builder’s settings to tweak padding, margins, or backgrounds.
- For advanced customization, add custom CSS to match your theme.
- Test Functionality:
- Click product images to confirm they link to the correct pages.
- Add items to the cart to verify the process works smoothly.
7. Tips for Success
- Keep Shortcodes Precise: Double-check spelling, especially for categories and tags, to avoid empty displays.
- Start Simple: Begin with basic shortcodes like [products limit=\”4\” columns=\”4\”], then experiment with filters like category or on_sale.
- Use Meaningful Sections: Label sections clearly (e.g., “Shop Our Bestsellers”) to guide customers.
- Monitor Performance: Pair your displays with analytics (e.g., Google Analytics with UTM parameters) to track clicks and conversions.
- Check Mobile Responsiveness: Ensure your product grid looks great on phones and tablets.
- Explore Shortcode Limits: Some shortcodes (e.g., [best_selling_products]) depend on sales data, so they’re less useful for brand-new stores.
Common Issues and Fixes
- No Products Show Up:
- Check for typos in category names or shortcode attributes.
- Ensure products are published and assigned to the specified category.
- For [best_selling_products] or [on_sale=\”true\”], confirm you have sales or discounts set.
- Layout Looks Off:
- Adjust the columns value to fit your theme’s width.
- Use your page builder to fine-tune spacing.
- Shortcode Not Working:
- Verify WooCommerce is active and updated.
- Test with a simple shortcode like [products limit=\”4\”] to isolate the issue.
Conclusion
Adding products to your WooCommerce homepage with shortcodes is a powerful, plugin-free way to showcase your store’s offerings. Whether you’re highlighting new arrivals, on-sale items, or specific categories, shortcodes give you flexibility to create an engaging shopping experience. Start with a basic setup, experiment with different displays, and watch your homepage come to life.
For more WooCommerce tricks, check out the WooCommerce documentation or search for tips on platforms like X. Want to build a full eCommerce site? Explore our tutorials for step-by-step guidance!
Call to Action: Try adding your first product shortcode today! Have questions or cool shortcode ideas? Share them in the comments below, and don’t forget to subscribe for more WooCommerce tutorials.