Location of head.phtml in Magento

65,838

Solution 1

Goto Core theme files in Magento : app/design/frontend/base/default/template/page/html/head.phtml

copy this file from Base and Paste it to you theme, that is

app/design/frontend/default/modern/template/page/html/head.phtml

Now change here as per your requirement.

To Remove Javascripts goto its XML file i.e. page.xml.

Enjoy :)

Solution 2

I figured out what the problem was. I needed to look in the base directory under the default template:

app/design/frontend/base/default/template/page/html

I'm not exactly sure why though.

Solution 3

FWIW, JS should usually be removed by commenting/deleting relevant lines from the /layouts files in your theme, not the head template file itself. Unless someone added those script lines manually (naughty code monkey), of course.

Share:
65,838
Admin
Author by

Admin

Updated on June 21, 2020

Comments

  • Admin
    Admin almost 4 years

    I am working with Magento and need to remove a Javascript that is being included in the <head> section by default.

    I am using a modified theme called modern. I am looking for head.phtml in:

    app/design/frontend/default/modern/template/page/html/head.phtml
    

    It does not exist. I do have header.phtml and footer.phtml. The code from header.phtml starts well after the <body> of the document.

    Where in the world would the head.phtml file be?

    Thanks in advance.