skip to Main Content

I want to make changes in "grid.phtml" file which is in the bellow file path at vendor side in Magento 2. path for file which need to override – " module-catalog-widget/view/frontend/templates/product/widget/content/grid.phtml".

With the help of Extension or Theme I want to override this file and want to add changes.

  • Thank for helping in advance.

2

Answers


  1. To override this file you can copy this grid.phtml and move it into your theme path will be :

    app/design/frontend/{theme_package}/{theme}/Magento_Catalog_Wiget/templates/product/widget/content/grid.phtml

    Please generate compile

    bin/magento setup:di:compile
    

    and don’t forget to clear cache

    bin/magento cache:clear
    
    Login or Signup to reply.
  2. You can try the blow method inside your theme.

    app/design/frontend/{theme_package}/{theme}/Magento_CatalogWidget/templates/product/widget/content/grid.phtml
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search