I want to add a bug herd javascript extension in head tag of my magento 2.1 store but unable to find the <head>
tag. i searched for the local xml but it was not there. How to locate this ?
1 Answer
it is on : /app/design/frontend/"your_theme_package"/Magento_Theme/layout/default_head_blocks.xml
-
-
how i will add in the xml file ? i want to add in
script
in this file. Commented Oct 17, 2017 at 14:30 -
you find : /app/design/frontend/your_theme/web/js. add a js file and call it in the head tag Commented Oct 17, 2017 at 14:32
-
can you please help how would i call this in the head tag i cannot see any js example . Commented Oct 17, 2017 at 14:32
-
just add a file in the js folder and name it : test.js and on the head tag add <script src="js/test.js"/> like this example prntscr.com/gyja88 Commented Oct 17, 2017 at 14:35