How to Remove Breadcrumbs From Product Page in Magento 2
Breadcrumbs are an important part of the website that not only helps Google bots to better understand the website hierarchy but these little navigational aids tell users where they are on your site. That’s why it makes a lot of sense to add these helpful little pointers. And thus, previously we covered the method to add breadcrumbs on product page in Magento 2.
On the other side, some websites do not require the display breadcrumbs because the main menu, secondary navigation, and some other blocks provide all the necessary information to show the way. If such a client demands you to remove the breadcrumbs from the product page, I have posted the programmatic method for the same here.
Breadcrumbs are simply the path to a product with the reference of the store map. It helps visitors with navigation in the store. But every business is different! If you need to remove breadcrumbs from product page in Magento 2 store, let it be so! We are not judging 😛
Method to Remove Breadcrumbs From Product Page in Magento 2:
Add the below code in your catalog_product_view.xml file at Vendor\Extension\view\frontend\layout
1 2 3 4 5 6 |
<?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="breadcrumbs" remove="true"/> </body> </page> |
That’s it.
Need help with the solution? Mention the doubts in the Comments section below and I’d be happy to help.
Please share the solution with fellow developers via social media.
Thanks.
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
Prev
How to Get Customer Addresses by Customer ID in Magento 2
How to Speed Up Magento 2 Admin Panel
Next