I have a Magento 2 theme I’m using for the design, and have a child theme created that I’m working off of. I am trying to modify the breadcrumbs html so I can extend some additional classes to it. I can’t find any breadcrumbs.phtml file in the parent theme, but I did find it in the vendor/magento/module-theme/view/frontend/template/html directory.
My question becomes, how can I create a new breadcrumbs.phtml file for my new child theme and where do I add it to the xml so it will be reflected on the frontend?
2
Answers
If you just want to override template, then you do not need to add it in xml, just copy the
breadcrumb.phtml
file to your theme’s directory and you can modify it in your theme.You can put your
breadcrumb.phtml
file at below path.It’s worth noting that a different PHTML file is used on product pages:
/vendor/magento/module-catalog/view/frontend/templates/product/breadcrumbs.phtml