Social Icons

twitterfacebookgoogle pluslinkedinemail

Saturday 13 October 2018

How to add External JS and CSS in Magento 2




Hello Friends,

Sometimes we need to add some external js or css in Magento 2.

So, Here is the code which will help you to add external js or css in your Magento 2 Project.

Please update below path of the file

/app/design/frontend/<ThemeName>/<Theme>/Magento_Theme/layout/default_head_blocks.xml
like
/app/design/frontend/Magento/luma/Magento_Theme/layout/default_head_blocks.xml

if there will no file than please copy from below path and add it in your theme template.
vendor/magento/module-theme/view/frontend/layout/default_head_blocks.xml
 

Free Advertisement

Free Advertisement

Free Advertisement

Free Advertisement