8 min read

What is the WooCommerce Featured Products Shortcode?

Shashank Dubey
Content & Marketing, Wbcom Designs · Published Jul 31, 2024 · Updated Aug 21, 2026
WooCommerce Featured Products Shortcode

The WooCommerce featured products shortcode is [products visibility="featured"]. Drop it into any page, post or widget and WooCommerce renders a grid of every product you have starred as featured in the product list. The older [featured_products] shortcode still works for backwards compatibility, but it has been deprecated for years and the [products] shortcode is the one to learn.

This guide covers how featured products are marked, every attribute that matters when you display them, where the shortcode still beats the block editor, and how to fix the usual “my featured products are not showing” problems. It is written against WooCommerce 11.0 (released August 2026) but nothing here has changed much since WooCommerce 3.x.

What “featured” actually means in WooCommerce

Featured is a product visibility term, not a setting in its own table. Under the hood WooCommerce stores it as the featured term in the product_visibility taxonomy. That is why the shortcode attribute is called visibility and why you can query featured products with a taxonomy query in custom code.

There are three ways to mark a product as featured:

  1. From the product list. Go to Products → All Products and click the star icon in the Featured column. Grey means not featured, filled means featured. This is the fastest way and works on the list without opening each product.
  2. From the product edit screen. In the Publish box, click Edit next to Catalog visibility, tick “This is a featured product”, then click OK and Update.
  3. In bulk. Select several products in the list, choose Edit from Bulk actions, and set Featured to Yes. This is the one to use when you are rotating a seasonal collection.

Featured products still obey their own catalog visibility. A product set to “Hidden” and also starred as featured will not appear in the featured grid, because the shortcode only shows products that are visible in the catalog. We see this one in support threads more than any other cause.

The shortcode and its attributes

The minimal version:

[products visibility="featured"]

With no other attributes this shows every featured product (limit defaults to -1, meaning all), four per row, sorted by title ascending. That is rarely what you want on a homepage, so here are the attributes worth knowing, taken from the official WooCommerce shortcode reference.

AttributeDefaultWhat it does
limit-1Maximum number of products to show. Use 4, 8 or 12 to match your column count.
columns4Products per row. Themes often override this on small screens.
paginatefalseAdds pagination links. Only works with a limit set.
orderbytitletitle, date, id, menu_order, popularity, rand or rating.
orderASCASC or DESC.
categorynoneComma-separated category slugs to restrict the featured set.
tagnoneComma-separated tag slugs.
ids / skusnoneHandpick products by ID or SKU.
on_salefalseOnly products currently on sale.
classnoneExtra CSS class on the wrapper so you can style this grid differently.

Examples we use on client sites

Four featured products, two per row, newest first. Good for a homepage “Staff picks” band:

[products limit="4" columns="2" visibility="featured" orderby="date" order="DESC"]

Featured products from one category only, useful on a category landing page:

[products limit="8" columns="4" visibility="featured" category="hoodies"]

Featured products that are also on sale, randomised so repeat visitors see a different set:

[products limit="6" columns="3" visibility="featured" on_sale="true" orderby="rand"]

A full featured catalogue with pagination, twelve per page:

[products limit="12" columns="4" visibility="featured" paginate="true"]

One warning on orderby="rand": it defeats page caching in the sense that cached pages will show the same “random” set until the cache clears, and on large catalogues the underlying ORDER BY RAND() query is slow. Fine for a few dozen featured products, not fine for thousands.

Shortcode or Product Collection block

If your site uses the block editor, WooCommerce would rather you used the Product Collection block. It has a built-in “Featured” collection (click Choose Collection in the block toolbar) and a Featured filter in the sidebar, and WooCommerce states that the older product grid blocks are being deprecated in favour of it. So which should you pick?

Use the shortcode whenUse the Product Collection block when
You are placing products inside a classic widget, a page builder text module, an email template, or a theme’s PHP via do_shortcode()You are building the page in the block editor or Site Editor
You need the output identical to your shop loop, because it uses the same content-product.php templateYou want to design each card visually (image position, price placement, add-to-cart style)
The site runs a classic theme and you want consistency with the rest of the catalogueThe site runs a block theme and you want the grid to inherit theme.json styles
You need to combine filters the block cannot, such as skus plus visibilityYou want the newer cart and product filter blocks to interact with the grid

Our position: on a classic theme, or inside Elementor and similar builders, the shortcode is still the right tool. On a block theme, use the Product Collection block and reserve the shortcode for places the block cannot reach. Both query the same featured term, so you can mix them on one site without the featured set drifting apart.

Using the shortcode in templates and widgets

You are not limited to the post editor. The three places we most often put a featured grid:

In a sidebar or footer widget

Add a Shortcode block (block widgets) or a classic Text widget and paste the shortcode. Set columns="1" for a narrow sidebar, otherwise the grid will wrap awkwardly.

In a theme template

In a child theme template, call it through do_shortcode() and escape nothing (the output is already HTML built by WooCommerce):

<?php
echo do_shortcode( '[products limit="4" columns="4" visibility="featured"]' );
?>

For the homepage of a store built on the StoreMate Dokan theme, we add this inside a full-width section so the grid lines up with the vendor listings above it.

Inside a page builder

Elementor, Bricks and Beaver Builder all have a Shortcode widget. WooCommerce’s own styles load on any page that contains the shortcode, so the grid will look like the shop page without extra CSS.

Styling the featured grid

Every [products] grid gets a ul.products wrapper with a columns-N class. Add your own class with the class attribute so you can target the featured grid without touching the shop page:

[products limit="4" visibility="featured" class="home-featured"]
.home-featured.products li.product {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
}
.home-featured.products li.product .button {
    width: 100%;
    text-align: center;
}

If your theme ships its own product card (most premium themes do), check whether it overrides woocommerce/content-product.php. If it does, the shortcode grid will inherit that card automatically, which is usually what you want.

Doing it in code instead

When you need more control than the shortcode offers, query featured products directly. Two options:

// Option 1: wc_get_products() with the featured flag.
$featured = wc_get_products( array(
    'featured' => true,
    'status'   => 'publish',
    'limit'    => 4,
    'orderby'  => 'date',
    'order'    => 'DESC',
) );

// Option 2: WP_Query with the visibility taxonomy.
$query = new WP_Query( array(
    'post_type'      => 'product',
    'posts_per_page' => 4,
    'tax_query'      => array(
        array(
            'taxonomy' => 'product_visibility',
            'field'    => 'name',
            'terms'    => 'featured',
        ),
    ),
) );

Prefer wc_get_products(). It goes through the WooCommerce data store, so it keeps working if the storage layer changes, and it returns WC_Product objects you can call get_price_html() on directly. You can also filter the shortcode’s own query with the woocommerce_shortcode_products_query filter if you want to tweak the arguments without rewriting the output.

Troubleshooting

The usual suspects when a featured grid is empty or wrong, in the order we check them:

  1. No products are starred. Go to Products → All Products and filter by Featured in the product type dropdown. If the list is empty, so is your grid.
  2. Catalog visibility is Hidden or Search only. Featured products must be visible in the catalog. Set visibility to “Shop and search results” or “Shop only”.
  3. Out of stock items are hidden. WooCommerce → Settings → Products → Inventory has “Hide out of stock items from the catalog”. If it is ticked, out-of-stock featured products vanish from the shortcode too.
  4. Curly quotes. Copying the shortcode from a document can turn " into typographic quotes, and WordPress then prints the shortcode as text. Retype the quotes.
  5. Caching. After starring a product, purge the page cache. The shortcode output is often cached at the page level by hosts and plugins.
  6. Theme overrides. If the grid shows but looks broken, the theme is overriding content-product.php with a template that expects shop page context. Check WooCommerce → Status → Templates for outdated overrides.

FAQ

Is [featured_products] still supported?

It still renders, because WooCommerce keeps deprecated shortcodes for compatibility, but it is no longer documented and could be removed. Swap it for [products visibility="featured"] when you are next editing the page.

Can I show featured products from multiple categories?

Yes. Pass a comma-separated list: category="hoodies,tees". The default cat_operator is IN, so products from either category are shown. Use cat_operator="AND" to require both.

How many featured products should a homepage show?

Four to eight. Enough to look curated, few enough that the section stays above a sensible scroll depth on mobile. If you need more, paginate or link to a dedicated featured page.

Does the shortcode work with variable products?

Yes. Variable products show a “Select options” button instead of “Add to cart”, exactly as on the shop page. The price displays as a range unless your theme changes it.

Where to start

Star four products, paste [products limit="4" columns="4" visibility="featured"] into your homepage, and look at it on a phone. Then decide whether you need ordering, category filtering or a custom class. Most stores never need more than that single line. If your store needs something the shortcode and the block cannot produce, such as a featured carousel tied to stock levels or vendor-specific featured sets, our WooCommerce development team builds that kind of thing regularly.

Shashank Dubey
Content & Marketing, Wbcom Designs

Shashank Dubey, a contributor of Wbcom Designs is a blogger and a digital marketer. He writes articles associated with different niches such as WordPress, SEO, Marketing, CMS, Web Design, and Development, and many more.

Related reading