skip to Main Content

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


  1. 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.

    appdesignfrontend<VENDOR_NAME><THEME_NAME>Magento_Themetemplateshtml

    Login or Signup to reply.
  2. It’s worth noting that a different PHTML file is used on product pages:

    /vendor/magento/module-catalog/view/frontend/templates/product/breadcrumbs.phtml

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search