Why Feature Products?
Featured products are an effective way to highlight:
- Best sellers
- New arrivals
- Seasonal promotions
- High-margin products
- Editor’s picks
- Limited-time offers
WooCommerce lets store owners mark products as Featured, making it easy to showcase selected products throughout the website without changing categories or product ordering.
Typical locations include:
- Homepage
- Landing pages
- Sidebar widgets
- Product recommendation sections
- Marketing pages
How WooCommerce Stores Featured Products
One important change many older tutorials miss is that WooCommerce no longer stores featured products using the _featured post meta field.
Since WooCommerce 3.0, featured products are stored using the product_visibility taxonomy, specifically the featured term. This improves query performance compared to querying post meta.
That means modern queries should use a tax_query, not a meta_query.
Querying Featured Products
A basic WP_Query looks like this:
$args = array(
'post_type' => 'product',
'post_status' => 'publish',
'posts_per_page' => 8,
'tax_query' => array(
array(
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'featured',
),
),
);
$featured_products = new WP_Query( $args );
This retrieves only published products that have been marked as Featured.
Displaying the Products
You can loop through the results just like any standard WordPress query:
if ( $featured_products->have_posts() ) :
while ( $featured_products->have_posts() ) :
$featured_products->the_post();
// Display product here
endwhile;
wp_reset_postdata();
endif;
Inside the loop you have access to all WooCommerce product functions, making it easy to display images, prices, ratings, and add-to-cart buttons.
Where Can You Use This?
A custom query gives complete control over where featured products appear.
Common examples include:
Homepage Hero
Display four featured products below the hero banner.
Landing Pages
Highlight products related to a campaign.
Homepage Categories
Show:
Featured Products ↓ Latest Products ↓ Best Sellers ↓ Sale Products
Sidebar Recommendations
Display a compact list of featured products.
Custom Gutenberg Blocks
Power a reusable “Featured Products” block using your own design instead of relying on WooCommerce shortcodes.
WP_Query vs WooCommerce Shortcodes
WooCommerce provides shortcodes such as:
[featured_products]
These are excellent for simple layouts.
However, WP_Query offers much greater flexibility.
Shortcodes
- Quick to implement
- Minimal code
- Limited customization
WP_Query
- Complete control
- Custom HTML structure
- Advanced filtering
- Easier integration with custom themes
- Better suited for complex layouts
If you’re building a bespoke WooCommerce theme or plugin, a custom query is often the better choice.
Taking the Query Further
Once you have the basic query, it’s easy to extend it.
Examples include:
Featured Products from a Category
Combine the featured visibility query with a product category filter.
Order by Menu Order
Respect the store owner’s custom product ordering.
Exclude Out-of-Stock Products
Improve customer experience by hiding unavailable products.
Show Only Products on Sale
Combine featured products with sale conditions for promotional sections.
Display Random Featured Products
Ideal for homepages where you want fresh content on each visit.
Performance Considerations
On stores with thousands of products:
- Limit the number of products returned.
- Avoid unnecessary custom fields.
- Cache expensive queries when appropriate.
- Load only the data you actually need.
WooCommerce moved featured products into a taxonomy partly because taxonomy queries scale better than metadata queries for large catalogs.
Common Mistakes
Using
_featured
Meta Queries
Many older tutorials still query:
meta_key => '_featured'
This is outdated for modern WooCommerce versions.
Forgetting
wp_reset_postdata()
Always reset the global post after a custom loop.
Returning Too Many Products
Avoid:
posts_per_page => -1
unless you genuinely need every featured product.
Repeating Expensive Queries
If the same featured products appear on multiple pages, consider caching the results.
Real-World Perspective
In custom WooCommerce projects, I rarely rely solely on shortcodes.
Instead, I build reusable product components powered by WP_Query, allowing featured products to appear in custom landing pages, marketing campaigns, dashboard widgets, and dynamic recommendation sections.
This approach provides complete control over the markup while keeping the implementation lightweight and easy to extend.
Best Practices
When displaying featured products:
- Use the product_visibility taxonomy.
- Limit the number of products returned.
- Reset post data after custom loops.
- Cache repeated queries where appropriate.
- Keep the HTML reusable so the same component can power multiple sections of the website.
Final Thoughts
Featured products are one of WooCommerce’s simplest merchandising tools, but they’re most effective when integrated thoughtfully into a store’s design.
By querying featured products with WP_Query, developers gain complete control over layout, filtering, and presentation while remaining compatible with modern WooCommerce architecture.
Whether you’re building a custom homepage, a promotional landing page, or a bespoke WooCommerce theme, understanding how featured products are stored and queried will help you create faster, more maintainable solutions.

