In Magento 2, breadcrumbs are a helpful navigation feature that shows the path a user has taken to reach the current page. However, there might be cases where you want to remove breadcrumbs from specific CMS pages. Unfortunately, Magento 2 by default does not offer settings to disable breadcrumbs per specific CMS page. From Magento 2.3.4, for the security enhancements, default custom layout update Textarea option removed from the CMS page admin section.
If you're looking to disable breadcrumb to a specific CMS page in Magento 2, you will need to handle it via XML layout.
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:
CMS Page Syntax:
cms_page_view_selectable_<PAGEIDENTIFIER>_<LayoutUpdateName>.xml
1. go to your app/design/frontend/<VendorName>/<ThemeName>/Magento_Cms/layout/ folder
2. create cms_page_view_selectable_<PAGEIDENTIFIER>_<LayoutUpdateName>.xml
<PAGEIDENTIFIER> indicates the identifier of the CMS Page(about-us)
<LayoutUpdateName> will be AboutPage, You can keep any desired name. (Note: use single word for the LayoutUpdateName without space, dash or underscore)
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_<PAGEIDENTIFIER>_<LayoutUpdateName>.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
6. Click Save and flush your cache
The breadcrumbs will be removed from the specific CMS page.