What Are Breadcrumbs?

Breadcrumbs are generally is set of paths that show visitors where they are in relation to other pages on the site. It can also provide deep-level navigation to your visitors, helping them identify in which category or subcategory the current product they're visiting is assigned.

Breadcrumbs are generally located below the header, just after the main menu navigation. The location may vary per theme used in your site. Any link in the breadcrumbs can be clicked by your site visitors to return to the previous page.

In Magento 2 by default, breadcrumbs are showing in categories and products pages and can be configured
to show or hide in CMS Pages.

Log in to the admin panel, and go to Stores > Settings > Configuration.

  • Expand General and click on the Web tab
  • Expand the Default Pages section
  • Set "Show Breadcrumbs for CMS Pages" to Yes
  • Click Save Config.
  • Flush caches

Magento 2 Show breadcrumbs CMS Pages

The breadcrumbs will be enabled to all CMS pages in the frontend.

To disable breadcrumbs to all CMS pages in Magento 2, just repeat the same steps you did while enabling, and set the Show Breadcrumbs for CMS Pages field to No.

  • Expand General and click on the Web tab
  • Open Default Pages section
  • Set "Show Breadcrumbs for CMS Pages" field to No
  • Click Save Config andFlush caches

The breadcrumbs will be disabled/removed from all CMS pages in the frontend.

Unfortunately, Magento 2 by default does not offer settings to disable breadcrumbs per specific CMS page.
If you're looking to disable breadcrumb to a specific CMS page in Magento 2, you will need to handle it via XML layout.

For Magento 2.3.3 Version and Below

If you're using Magento 2.3.3 version and below, it's possible to remove/disable breadcrumbs in the backend under the "Layout Update XML" field on the CMS edit page. You can achieve it as follows:

1. Log into your Magento 2 backend, and go to Content > Pages

2. Select your CMS pages from the grid

3. At the CMS edit page, expand to the Design section and set Layout to your preferred layout

4. Now, in the Layout Update XML field, enter the code below to remove breadcrumb for the specific CMS page

<referenceContainer name="page.top">
    <referenceBlock name="breadcrumbs" remove="true" />
</referenceContainer>

5. Make sure to clear your cache

The breadcrumb will be removed from specific page in the frontend.

Magento 2.3.4 Version and Above

In Magento 2.3.4 version and above, the Custom Layout Update field on the CMS Page Edit, Category Edit, and Product Edit pages where it was possible to add a direct XML layout update no longer exist. This removal was made to remove the opportunity for Remote Code Execution (RCE). 

To remove the breadcrumb for a specific CMS page, you will need to add your custom layout update under your theme, then set it in the backend so it can render in the frontend. You can achieve it as follows: 

1. go to your app/design/frontend/<VendorName>/<ThemeName>/Magento_Cms/layout/ folder

2. create cms_page_view_selectable_<CMS Page Identifier>_<Layout Update Name>.xml

  • <CMS Page Identifier> is your CMS page’s URL Key 
  • <Layout Update Name> is what will appears in Design > Custom Layout Update field in the backend (CMS Edit page)

For example, a layout update for an “About Us” page will be “cms_page_view_selectable_about-us_AboutUs.xml”.

3. In this cms_page_view_selectable_<CMS Page Identifier>_<Layout Update Name>.xml file, add the code below

<?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> ​

4. Flush your cache

5. In the backend, go to Content > Pages. Choose your CMS page, expand the Design section, select your custom created layout update in the "Custom Layout Update" field

Magento 2 breadcrumbs CMS pages

6. Click Save and flush your cache

The breadcrumbs will be removed from the specific CMS page.

In the default Magento 2, breadcrumbs are available for CMS, categories, and products page only.

If you're looking to display breadcrumb to all your customer account pages, contact us page, compare product pages, wishlist index pages, wishlist share pages, shopping cart, checkout index page, checkout success pages, you can try this Magento 2 Advanced Breadcrumbs Extension to achieve it easily.

Magento 2 breadcrumbs on other pages

The extension comes with a bunch of features. You can use the longest/full or shortest breadcrumbs path to product pages. It adds breadcrumbs rich snippets to each product page. You can prioritize categories path to display in breadcrumbs for products that are assigned to more than one category.

Magento 2 Short full breadcrumbs

The Advanced Breadcrumbs Extension for Magento 2 is easy to configure and use. It saves time on adding breadcrumbs to the pages Magento 2 does not by default. Feel free to check the extension page for more details, read the user guides, and try out the live demos.

If you would like to add breadcrumbs to any additional/customs pages that are not supported by Magento 2 Advanced Breadcrumbs Extension, adds rich snippets breadcrumbs to some of your pages, or adjust the existing breadcrumbs on some of your pages, it's recommended to hire a professional Magento 2 developer to handle it for you, ensuring that it's done properly without any negative impact on your site.

Conclusion

We hope you found helpful this article about Magento 2 CMS Pages Breadcrumbs Feel free to share this article or leave a comment below. Your opinion is much appreciated!

Tags: seo magento-2-marketing-tutorials breadcrumbs