Customizing WooCommerce Breadcrumbs to Link to Landing Pages Instead of Categories

In a recent Business Bloomer Club Slack thread, a question arose about customizing WooCommerce breadcrumbs.

A client had created unique landing pages for each product category outside WooCommerce, and they wanted the breadcrumbs on product pages to link to these new landing pages rather than WooCommerce’s standard category pages.

Here’s a breakdown of potential solutions.

Solution #1: Edit WooCommerce Breadcrumbs to Link to Custom URLs

One approach is to modify the breadcrumb structure itself, linking it to the custom landing page URLs rather than WooCommerce’s default category pages. A custom filter for WooCommerce breadcrumbs can achieve this, replacing /category/ with the client’s preferred URL structure.

Solution #2: Use Redirects to Point from WooCommerce Categories to Landing Pages

Another option is to set up redirects from each default category URL (/category/woo-category-name) to the custom landing page (/custom-category-name). This avoids altering WooCommerce’s structure and provides a seamless user experience by rerouting users to the correct landing pages.

Option for Integrating Custom Landing Page Content

As an alternative, consider integrating the landing page content directly into the WooCommerce category pages. The client can use their page builder to save the landing page as a shortcode and add it to the category description field, displaying the content without disrupting WooCommerce’s structure.

However, as noted, WooCommerce will still show the default product loop below this custom content. To disable the product display, try the following:

add_action('woocommerce_before_main_content', function() {
if (is_product_category()) {
remove_action('woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10);
}
}, 20);

Or, you could use a template override in archive-product.php to fully control the category page layout.

Conclusion

While customizing WooCommerce breadcrumbs is possible, integrating the custom landing pages directly into category pages with shortcode inserts and hiding the product loop may offer a simpler, more maintainable solution. This approach keeps the site structure cleaner and leverages WooCommerce’s built-in SEO benefits for category pages.

Related content

  • WooCommerce: Rename a Breadcrumb Item
    WooCommerce generates shop, category, tag, single product breadcrumbs out of the box. Such breadcrumbs should follow your WooCommerce permalink settings. For example, I use the…
  • WooCommerce: How to Add Breadcrumbs
    Ensuring a positive customer experience has become the top priority of eCommerce businesses in 2022 – even overtaking product price and quality as a key…
  • Storefront Theme: How To Remove Breadcrumbs
    Storefront is the most compatible theme when it comes to building a WordPress eCommerce website. Following the best practices Storefront displays Breadcrumb navigation at the…

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

Reply

Your email address will not be published. Required fields are marked *