1

I want to over-ride title phtml file so i copied it from

F:/xampp/htdocs/magento2/vendor/magento/module-theme/view/frontend/templates/html/title.phtml

Magento\Theme\Block\Html\Title.phtml

To

F:\xampp\htdocs\magento2\app\design\frontend\GWtheme\GW\templates\html\title.phtml

Here Gwtheme\Gw is custom theme foldernames

But when i flush cache and check the files seems not be over-ridden.

1

You have to first keep your theme name in small case as per magento recommendation. Keep theme name gw.

After create custom theme, you have to set your theme inside admin.

Stores -> Configation -> General -> Design

Set your custom theme and save.

Now you can override core template, you have missing core module name here is Magento_Theme

Path is, app/code/design/frontend/GWtheme/gw/Magento_Theme/templates/html/title.phtml

Now You can deploy your content using,

php bin/magento setup:static-content:deploy

Remove var folder from root and check again.

4
  • One more question for over-riding css, I want to change nav color, i did this and flushed cached but not working, F:\xampp\htdocs\magento2\lib\web\css\source\lib_navigation.less F:\xampp\htdocs\magento2\app\design\frontend\GWtheme\gw\web\css\source\lib_navigation.less and on top of the navigation i placed @_nav-background-color:#fff; to change nav color but see to be not working
    – Rakhi
    May 3 '16 at 11:35
  • frist delete pub/static/frontend folder and you can deploy command, php bin/magento setup:static-content:deploy May 3 '16 at 12:12
  • i did that, but the i did for css is correct ? to copy nav.less and add different color in overridden file?
    – Rakhi
    May 3 '16 at 12:15
  • How Can I overwrite a page title html, including extra tags for a specific page? Apr 12 '18 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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