🚀 Executive Summary
TL;DR: Converting WooCommerce to a catalog-only site risks breaking its architecture if “Add to Cart” buttons are merely hidden with CSS. Robust solutions involve using dedicated plugins, custom code snippets in a child theme’s functions.php to remove functionality at the source, or considering Custom Post Types or headless architecture for non-e-commerce needs.
🎯 Key Takeaways
- Hiding WooCommerce elements with CSS (e.g., `display: none !important;`) is a critical pitfall that can break JavaScript dependencies and site functionality.
- Robust catalog mode implementation involves removing “Add to Cart” buttons and prices at the source using WooCommerce hooks (`remove_action`) and filters (`add_filter`) in a child theme’s `functions.php`.
- For sites never intended for e-commerce, consider Custom Post Types (CPTs) with ACF or a Headless WordPress architecture to eliminate WooCommerce bloat and optimize performance and scalability.
Struggling to turn WooCommerce into a product catalog? This guide covers three real-world approaches—from quick plugins to robust custom code—that professional developers use to get it right without breaking your site.
WooCommerce as a Catalog: The Engineer’s Guide to Ditching the Cart Without Breaking Everything
I still remember the 3 AM panic call. A major client was launching a B2B portal in the morning—a “look but don’t touch” catalog for their partners. A junior dev was tasked with hiding the “Add to Cart” button. He did it with a simple display: none !important; in the global CSS. The site looked fine on his machine. But when the project manager in another timezone logged into prod-b2b-portal-01 to do a final check, half the product grid JavaScript was broken and the layout was a mess. Why? Because a dozen other scripts were tethered to that button’s existence. We spent the next two hours untangling that “simple” fix. This, right here, is why turning an e-commerce platform into a simple catalog can be a minefield if you don’t respect the architecture.
The Root of the Problem: You’re Fighting the Framework
Let’s get one thing straight: WooCommerce is built to do one thing exceptionally well—sell things. Its entire ecosystem of hooks, actions, and templates is built around the concept of a product having a price and a cart waiting to hold it. When you decide you don’t want the cart or the price, you’re not just hiding a button; you’re fundamentally altering the data flow and expected behavior of the platform. It’s like trying to use a Formula 1 car to haul groceries. Sure, you can probably strap a basket to it, but it’s not going to be an elegant—or efficient—ride.
The key is to remove these features at the source, not just cover them up with CSS. Here are the three paths we take at TechResolve, depending on the project’s needs.
Solution 1: The Quick Fix (The Plugin Play)
This is your “I need this done by lunch” option. There are several reputable plugins, like YITH WooCommerce Catalog Mode, that handle this for you. They provide a nice UI in the WordPress admin where you can flip a switch to disable the Add to Cart button, hide prices, and even replace the cart functionality with a custom “Request a Quote” form.
When to use it: Perfect for small sites, tight deadlines, or when the person maintaining the site isn’t a developer. It’s a solid 80% solution that gets the job done with minimal fuss.
The Catch: You’re adding another layer of abstraction and another potential point of failure. I’ve seen these plugins conflict with complex themes or other WooCommerce extensions. You’re also putting your site’s core functionality in the hands of a third-party developer, so you’d better trust their coding standards and update schedule.
Solution 2: The Permanent Fix (The Craftsman’s Code)
This is my preferred method for any serious build. We’re not going to hide the buttons; we’re going to tell WooCommerce not to render them in the first place. This is done by adding a few snippets to your child theme’s functions.php file. It’s clean, performant, and has zero dependencies.
Heads Up: Never, ever, edit your parent theme’s
functions.phpfile directly. Your changes will be wiped out the next time the theme updates. Always use a child theme. If you don’t know how, stop and learn that first. Seriously.
Step 1: Remove the “Add to Cart” Button
WooCommerce has different hooks for the main shop/archive pages and the single product page. You need to target both.
// Remove Add to Cart button from the shop/archive page
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
// Remove Add to Cart button from the single product page
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
Step 2: Hide the Prices
Similarly, we can unhook the functions that display the price. This filter-based approach is much cleaner than CSS because the price data is never even sent to the browser.
// Return an empty string for prices to hide them
add_filter( 'woocommerce_get_price_html', '__return_empty_string' );
add_filter( 'woocommerce_cart_item_price', '__return_empty_string' );
With these few lines of code, you’ve effectively turned off the core purchasing functionality at the source. It’s robust and will survive theme and plugin updates without a problem.
Solution 3: The ‘Nuclear’ Option (The Architect’s Rethink)
Sometimes, the right move is to take a big step back and ask, “Are we even using the right tool for the job?” If the site will never be used for e-commerce, and you’re just using WooCommerce for its product data structure, you might be carrying a lot of unnecessary baggage. All that database overhead for orders, customers, and coupons is just sitting there on prod-db-01, consuming resources for no reason.
In this scenario, I advise my clients to consider two alternatives:
- Custom Post Types (CPTs): Use a plugin like Advanced Custom Fields (ACF) to build your own “Product” post type. You get a completely custom data structure, zero e-commerce bloat, and total control over your templates. It’s more work upfront but results in a lightning-fast, lean-and-mean website.
- Headless Architecture: For large-scale catalogs where performance is paramount, we use WordPress purely as a backend data source. We build a ‘Product’ CPT, expose the data via the REST API, and then build the front-end with a modern JavaScript framework like Next.js or Astro. The result is a blazing-fast static site that is more secure and scalable than a traditional WordPress setup.
Which Path Should You Choose? A Quick Comparison
| Approach | Speed of Implementation | Control & Performance | Long-Term Maintenance |
| 1. The Plugin | Fast (Minutes) | Low | Medium (Plugin updates/conflicts) |
| 2. The Code Snippets | Medium (Hours) | High | Low (Set it and forget it) |
| 3. The Architect’s Rethink | Slow (Days/Weeks) | Maximum | Low (But requires specialized skills) |
Ultimately, there is no single best answer. The right choice depends on your budget, timeline, and technical expertise. But please, for the love of all that is stable, don’t just hide the button with CSS. Your future self—and the on-call engineer at 3 AM—will thank you.
🤖 Frequently Asked Questions
❓ How do I disable the “Add to Cart” button and hide prices in WooCommerce for a catalog-only site?
You can disable the “Add to Cart” button by unhooking `woocommerce_template_loop_add_to_cart` and `woocommerce_template_single_add_to_cart`. Prices can be hidden by filtering `woocommerce_get_price_html` and `woocommerce_cart_item_price` to return an empty string, ideally within your child theme’s `functions.php`.
❓ What are the trade-offs between using a plugin versus custom code for a WooCommerce catalog site?
Plugins offer fast implementation and a UI but introduce third-party dependencies and potential conflicts. Custom code snippets provide higher control, better performance, and lower long-term maintenance but require technical expertise and more upfront time.
❓ What is a common mistake when converting WooCommerce to a catalog, and how can it be avoided?
A common pitfall is using `display: none !important;` in CSS to hide “Add to Cart” buttons and prices, which can break JavaScript and other site functionalities. This can be avoided by removing these elements at the source using WooCommerce hooks and filters or by employing a dedicated catalog mode plugin.
Leave a Reply