0

I'm trying to move the breadcrumbs into the header, right now it displays outside of it.

What I mean is as follows:

enter image description here

the above shows the breadcrumbs being outside of the header, I want it to be a part of the header.

The location of the breadcrumbs file is as follows.

app/design/frontend/vendor/theme/Magento_Theme/templates/html/breadcrumbs.phtml

The breadcrumbs display only on the catalog and product pages and I want it to stay that way.

How can I get the breadcrumbs to be included/nested in the header?

1 Answer 1

0

First, you have to move the breadcrumbs block in XML. So in the app/design/frontend/vendor/theme/Magento_Theme/layout/default.xml

<move element="breadcrumbs" destination="your destination" before="xxx"/>
3
  • When I do that the breadcrumb disappears all together <move element="breadcrumbs" destination="header" before="main.content"/> currently it displays only on the category and product pages and I want it to stay that way. Commented Nov 23, 2022 at 17:54
  • <move element="breadcrumbs" destination="header" before="minicart"/> You have to add it like this. "main.content" isn't the header element.
    – Aaron Wang
    Commented Nov 23, 2022 at 18:54
  • That didn't work either, I'm not sure it this is something to do with the theme. Commented Nov 23, 2022 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.