How to Remove Product Links in WooCommerce: A Beginner’s Guide
So, you’re building a WooCommerce store and you’ve run into a slight snag: you want to remove the product links from your catalog, shop page, or specific parts of your site. Maybe you’re building a catalog-only website, using WooCommerce for inventory management but not for direct sales, or perhaps you just want a cleaner, more streamlined look.
Whatever your reason, you’ve come to the right place. This guide will walk you through several ways to remove those pesky product links, catering to different levels of technical expertise. We’ll keep it simple, clear, and provide real-life examples to help you understand the “why” behind each method.
Why Remove Product Links? Real-World Scenarios
Before we dive into the “how,” let’s quickly explore *why* you might want to remove product links. Understanding this will help you choose the best method for your specific needs.
- Catalog Mode: Many businesses use WooCommerce as a product catalog without enabling direct purchases. Think of a furniture store where customers browse online but make purchases in-store. Removing product links ensures customers don’t expect an “add to cart” button.
- Quote-Based Systems: Some businesses, especially those selling custom or large-scale items, prefer to provide quotes instead of direct pricing. Removing product links encourages customers to contact you for a quote.
- Wholesale Only: If your store is exclusively for wholesale customers, you might want to hide individual product pages from the general public. Removing the links makes it harder for retail customers to access product details.
- Design and User Experience: Sometimes, fewer links create a cleaner, more focused browsing experience, especially if you’re heavily reliant on custom categories or collections.
- Catalog Mode for WooCommerce by IconicWP: This is a robust plugin specifically designed for converting your WooCommerce store into a catalog. It often includes options to remove product links, “add to cart” buttons, and pricing.
- WooCommerce Catalog Mode, Enquiry, Quote and Hide Price Plugin by Addify: Similar to the above, this plugin offers features to switch to catalog mode, handle product inquiries, provide quotes, and hide prices.
- `content-product.php`: This is the main template for displaying a single product in loops (e.g., the shop page, category pages).
- `archive-product.php`: This is the template for your shop page.
- Sometimes other templates are related to your specific theme layout.
Methods to Remove Product Links: From Simple to Advanced
Now, let’s get to the meat of the matter: removing those product links. We’ll start with the easiest methods and gradually move towards more code-intensive options.
#### 1. Using a Plugin (The Easiest Route)
For non-developers, using a plugin is the most straightforward and recommended option. Several plugins can achieve this with a few clicks.
How to Use a Plugin:
1. Install and Activate: In your WordPress dashboard, go to “Plugins” -> “Add New.” Search for a plugin like “Catalog Mode for WooCommerce” or “WooCommerce Catalog Mode Enquiry, Quote and Hide Price Plugin” and install/activate it.
2. Configure the Plugin: Go to the plugin’s settings page (usually under “WooCommerce” or a dedicated menu item).
3. Enable Catalog Mode: Look for an option to enable “Catalog Mode” or “Remove Product Links.” Usually, there are other options like remove price.
4. Save Changes: Save the plugin settings, and voila! Your product links should be gone.
Example: Let’s say you’re using the “Catalog Mode for WooCommerce” plugin. You’d navigate to its settings, find the “Product Links” option, and toggle it off.
Reasoning: Plugins provide a user-friendly interface and handle the complex code modifications behind the scenes. This minimizes the risk of breaking your site.
#### 2. Customizing Your Theme’s Templates (Requires Coding Knowledge)
If you’re comfortable with PHP and your theme’s template structure, you can directly modify the theme files responsible for displaying product listings. Always back up your theme before making any code changes! Creating a child theme is *highly* recommended.
The main files to look at are:
Steps to Remove Product Links:
1. Locate the Relevant Template: Use your browser’s developer tools (right-click on the product listing and select “Inspect”) to identify which template is being used to display the product listing.
2. Edit the Template File: Using a code editor (like VS Code, Sublime Text, or Notepad++), open the template file (e.g., `content-product.php`) in your child theme.
3. Remove or Modify the Link: Look for the `` tag (HTML anchor tag) that wraps the product image or title. You can either remove the entire tag or just remove the `href` attribute (the URL) from it.
Example:
Original Code (in `content-product.php`):
<a href="">
Modified Code (removing the link):
Or (removing just the href):
4. Save and Upload: Save the modified template file and upload it to your child theme’s directory, mirroring the folder structure of the parent theme (e.g., `child-theme/woocommerce/content-product.php`).
5. Clear Cache: Clear your website’s cache (if you’re using a caching plugin) to ensure the changes are displayed correctly.
Reasoning: This method provides granular control over how product listings are displayed. However, it requires a good understanding of PHP and WordPress theme structure.
#### 3. Using a Code Snippet (Intermediate Option)
This method involves adding a small piece of PHP code to your theme’s `functions.php` file (again, use a child theme!) or using a code snippet plugin like “Code Snippets.”
/**
How to Use the Code Snippet:
1. Install a Code Snippet Plugin: If you don’t want to edit your theme’s `functions.php` file directly (recommended), install and activate the “Code Snippets” plugin.
2. Add a New Snippet: In your WordPress dashboard, go to “Snippets” -> “Add New.”
3. Paste the Code: Paste the PHP code snippet into the code editor.
4. Name the Snippet: Give the snippet a descriptive name (e.g., “Remove Product Links”).
5. Save and Activate: Save and activate the snippet.
Reasoning: This method is cleaner than directly modifying theme files and can be easily disabled if needed. It’s a good compromise between using a plugin and directly editing theme templates.
#### 4. CSS (The Least Recommended)
While it’s *possible* to visually hide the product links using CSS, it’s not a reliable solution. The links are still present in the HTML, which can impact SEO and accessibility.
Example CSS:
.woocommerce ul.products li.product a {
pointer-events: none;
cursor: default;
}
Reasoning: This merely disables the clicking of the links, but it won’t remove them. This might also confuse users. Prefer the other methods outlined above. Avoid this method unless you have a *very* specific reason for using it.
Choosing the Right Method
- Beginner: Use a plugin. It’s the easiest and safest way to remove product links.
- Intermediate: Use a code snippet. It provides more control than a plugin but requires some PHP knowledge.
- Advanced: Customize your theme’s templates. This gives you the most control but requires a strong understanding of PHP and theme structure.
No matter which method you choose, always back up your website before making any changes. This will ensure you can easily restore your site if something goes wrong. Good luck!