How to add custom javascript and css file in magento



How to add custom javascript and css file in magento..

Answer / Richa Pal

In Magento, you can add custom JavaScript and CSS files by following these steps:
1. Go to your theme's folder (e.g., app/design/frontend/<Vendor>/<Theme>).
2. Navigate to the Web directory (app/design/frontend/<Vendor>/<Theme>/web).
3. In the css directory, create a new file for your custom styles and link it in the appropriate less file.
4. In the js directory, create a new JavaScript file and register it in the di.xml under registration.js.
5. Clear Magento cache to see your changes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Magento PHP Interview Questions

What is cms and crm?

1 Answers  


Is magento owned by adobe?

1 Answers  


what is the limitation of Magento?

1 Answers  


What permissions required for file and folder in magento?

1 Answers  


What are the best ecommerce platforms?

1 Answers  


How to check magento version?

1 Answers  


How to enable cron in magento?

1 Answers  


What is inventory management?

1 Answers  


How to include js in magento?

1 Answers  


what the history behind magento?

1 Answers  


Is magento free?

1 Answers  


What is page layout section?

1 Answers  


Categories