2

Here is what i have already done.

  • Installed Magento 2
  • Created custom theme in magento 2
  • Applied that theme
  • Created "templates directories" to override template files

I have copied header.phtml

from my-magento-directory\vendor\magento\module-theme\view\frontend\templates\html

and pasted it to my-magento-directory\app\design\frontend\my-package\my-theme\Magento_Theme\templates\html

I have this default luma theme header, please see the image below.

enter image description here

And i want to make it like this, please see the image below.

enter image description here

EDIT

enter image description here

  • Sounds like you have it, just customize the code you have paisted into my-magento-directory\app\design\frontend\my-package\my-theme\Magento_Theme\templates\html and refresh the cache – Holly Mar 25 '17 at 5:43
  • But is it not actually customizing the entire header, that's what the problem is. See when I put some testing code into header.phtml, it comes into source I can see it in view source in the browser, but is only coming under <ul class="header links"> only. It is not affecting the code outside of this ul. Please see the image I have added as edit in the question. – Soeb Safi Mar 25 '17 at 6:11
  • That template is nested within a parent template which contains the opening ul tag. Have you tried turning on template path hints to see exactly all of the templates which form the header. Also you should really be looking at using magento's layout.xml to make structural/layout changes. – Holly Mar 25 '17 at 8:57

Your Answer

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

Browse other questions tagged or ask your own question.