Should You Redirect Your WooCommerce Shop Page to Your Only Product Category?

In a recent Business Bloomer Club discussion, a WooCommerce store owner raised an interesting question about managing duplicate content on their site. The store features multiple product categories, but the main Shop page only showcases one category.

This creates a situation where both the “Shop” and “Product Category” pages display identical content, potentially impacting SEO by creating duplicate content.

The store owner is considering redirecting the Shop page to the specific Product Category page and indexing only that page.

Let’s explore the pros and cons of this approach and provide some practical recommendations for optimizing the Shop page while maintaining the best SEO practices.

Continue reading Should You Redirect Your WooCommerce Shop Page to Your Only Product Category?

WooCommerce: Inject Ad After the nth Product @ Shop Page

Is it possible to insert a custom loop item, such as a promotional banner or a “fake” product, into the WooCommerce shop page after a specific number of real products – for example, after the third one?

Spoiler alert: yes, it is!

This won’t alter the results counter though (“Showing 1–12 of 10138 results“), and only works on the “classic” Shop Page, but we can live with that.

In this post, we’ll explore a simple way to inject custom HTML into the shop loop at a specific position, without affecting pagination or breaking layout. This solution is ideal for inserting ads, upsells, or custom notices directly in the WooCommerce product grid. Enjoy!

Continue reading WooCommerce: Inject Ad After the nth Product @ Shop Page

WooCommerce: Auto-Hide Products Without a Featured Image

In WooCommerce, having a well-organized product catalog is essential for user experience and conversions. However, some store owners may forget to add featured images to products, leading to empty placeholders that can make the shop look incomplete or unprofessional.

If you want to ensure that only products with a featured image are displayed, you need a way to automatically hide those without one.

Instead of manually checking and updating each product, you can use a simple PHP snippet to exclude products missing a featured image from your shop, category, and search pages. This approach keeps your store looking polished while preventing customers from encountering blank product thumbnails. The best part? It only takes a few lines of code to implement.

Below, I’ll show you how to add this snippet to your theme’s functions.php file or a custom plugin, ensuring that only properly set up products appear in your WooCommerce store.

Continue reading WooCommerce: Auto-Hide Products Without a Featured Image

WooCommerce: Display Only Products On Sale @ Shop

In my own WooCommerce shop, for Black Friday, I wanted to send customers directly to the Shop page showcasing only items on sale. To my surprise, WooCommerce doesn’t provide a built-in way to sort products by “on sale” out of the box.

This led me to explore a solution that not only solved the problem but also added a new sorting option to the WooCommerce Shop page dropdown.

Now, with a simple code snippet, you can enable a “Sort by On Sale” feature, or even use the “orderby=on_sale” parameter with your Shop page URL to show sale items effortlessly!

Continue reading WooCommerce: Display Only Products On Sale @ Shop

WooCommerce: Hide Free Products [Code Snippet]

Are free products cluttering your WooCommerce store? Or are they so many, that you have no intention of manually setting them to “catalog visibility: hidden” one by one and need a proper shortcut?

Well, this guide will walk you through effective methods to conceal them, enhancing your store’s overall aesthetic and user experience.

Discover how to strategically hide $0 products from the shop / category / archive pages using WooCommerce custom code or dedicated plugins – enjoy!

Continue reading WooCommerce: Hide Free Products [Code Snippet]

WooCommerce: Hide “View Cart” Button Upon Ajax Add to Cart

WooCommerce has a built-in AJAX functionality for adding products to the cart on archive pages (Shop page, product category pages, tag pages, etc.). Once you add a product, WooCommerce displays a “View Cart” button beside the “Add to Cart” one.

The “View Cart” button is a way to improve user experience, so that customers can quickly access their cart after adding a product. However, I’ve noticed on some client websites that this can mess up the product grid layout, confuse users and – sometimes – hurt the overall UX instead of improving it!

With the snippet below you’ll learn how to remove this button – surely you’re familiar with the CSS display:none method, so we will see a different approach here, so that the button doesn’t even load. Enjoy!

Continue reading WooCommerce: Hide “View Cart” Button Upon Ajax Add to Cart

WooCommerce Without Product Images

This is an edge case, however it may happen that a B2B business requires no product images and doesn’t want to use the WooCommerce image placeholder either (this shows on shop/category pages and the single product page when no featured image is added).

This interesting question was asked by a Club member in our private Slack channel, so I didn’t hesitate for a second and looked for a quick fix (2 lines of code). Enjoy!

Continue reading WooCommerce Without Product Images

WooCommerce: Hide Sale! Badge If Product Is Out Of Stock

If a product cannot be purchased because it is out of stock, why would you want to tell people that it’s on sale – only because it has a sale price?

That would probably clutter your shop and maybe get the customer to click on the wrong item just because it was standing out, only to find out they can’t purchase it!

So, let’s fix this little “design bug” in WooCommerce – let’s make sure the Sale! badge gets hidden in case the product is out of stock. Enjoy!

Continue reading WooCommerce: Hide Sale! Badge If Product Is Out Of Stock

WooCommerce: Sort By Featured Products @ Shop

The “Default sorting” dropdown sorts products by menu_order and then title on the WooCommerce Shop, Category and Tag pages.

But what if you want to place the featured products first in the list (I mean, why would anyone set products as featured if you can’t really “promote” them on the Shop page)?

In today’s case study, we will replace the “Default sorting” option with a workaround, create a new one with the same label (so that customers won’t notice it), set it as the default sorting option, and make sure it sorts by featured products first, and then by menu_order and title. Enjoy!

Continue reading WooCommerce: Sort By Featured Products @ Shop

WooCommerce: Hide “Private” Products From The Shop Page

WooCommerce admins and store managers can set the product visibility to “Private“. This is helpful if they need to hide certain products from the public, while keeping them available for manual invoicing or other purposes.

The problem, however, is that if admins or store managers are logged in, private WooCommerce products (as well as private WordPress posts, private WordPress pages, etc.) are actually visible on the Shop, Category and product loop pages.

The “Private: ” prefix is added to the product title (see screenshot), but there is usually no need to alter the frontend with products that are not going to be added to the cart anyway!

So, let’s hide private products for WooCommerce administrators from the frontend. Enjoy!

Continue reading WooCommerce: Hide “Private” Products From The Shop Page

WooCommerce: Add to Cart Form @ Shop Page

We’ve already covered a similar customization on Business Bloomer: how to display Ajax quantity selectors on the WooCommerce Shop page. The problem there was that that only works for simple products, and only when Ajax add to cart is activated via the WooCommerce settings.

Today I’d like to experiment a little, and see what happens when we include the “add to cart template” (i.e. the one you see on the WooCommerce Single Product page) under each product on the WooCommerce Shop page.

This *should* work with all product types – especially variable products – because you will see the attribute dropdown selectors in such a case, as if you were on the single product page.

I haven’t tested this with grouped, bundle, and special product types, so feel free to share your findings in the comments below. Enjoy!

Continue reading WooCommerce: Add to Cart Form @ Shop Page

WooCommerce: Capitalize All Product Names

When you deal with WooCommerce websites, you also need to look into design, readability, and accessibility. And if you have hundreds or thousands of products, you probably need to set some global rules so that you don’t need to worry about editing each product manually.

One rule could be the way product titles are displayed. Maybe you have a mix of capitalized product names (“Red Square Table”), non-capitalized ones (“White round chair”) and all caps ones (“GREEN COUCH”), and therefore you’re looking for a PHP shortcut to fix this automatically.

So, here’s a super simple solution to capitalize all product titles. Enjoy!

Continue reading WooCommerce: Capitalize All Product Names

WooCommerce: Get 10+ New Widgets With This Elementor Add-on

Already using Elementor to build your one-of-a-kind WooCommerce website?

Great, because you can now take your powered-by-Elementor WooCommerce store to the next level with a new third-party extension.

Think of product tables, grids, and carousels; of product page widgets such as toggles, improved star ratings, sale countdowns, and add to cart plus and minus buttons.

Also, category grid and carousel views. With plenty of layout and styling options, you can create a unique look and feel for your WooCommerce store.

Developed by Consortia, a company with a track record of creating popular plugins for WooCommerce like Bulk Table Editor, Cost & Reports and Bulk Category Editor, the new Consortia Addons plugins is the perfect fit for those who want to step up their Elementor game and take advantage of new features.

Continue reading WooCommerce: Get 10+ New Widgets With This Elementor Add-on

WooCommerce: Search Products By SKU (Frontend)

The frontend WooCommerce product search, for some reason, doesn’t work for SKU values. If it does, then your theme developers were smart enough to include this in their code, because this is a big problem especially for B2B stores.

Today, we’ll study how to alter the product search query, as well as the wc_get_product_id_by_sku() function, which is super helpful to determine the product ID for a given SKU. Enjoy!

Continue reading WooCommerce: Search Products By SKU (Frontend)