Web Analytics

Fill the form & Get Installation Support

Magento 2: How to add store code to body class in multi store view?

In some cases, you will need to add a class to the body tag of your Magento stores. To process it, you’ll need to set-up an event observer for the layout_render_before event.

1. Create file events.xml on app/code/Magemonkeys/Addbodyclass/etc/frontend

2. Create file LoadBefore.php on app/code/Magemonkeys/Addbodyclass/Observer/Frontend/Layout



Fill the below form if you have any Magento programming need.

    Recent Articles

    Author Info

    Author Image

    Magento 2 Developer

    Hire H. Shingala

    Get a Free Quote

      /* second popup */

      Connect With Us