Have you ever struggled with how to programmatically add a custom layout handle to a product page and what’s the best way to do it? Use the power of Magento 2 plugins (also called interceptors) added into the right place and you’re done!
In order to add a custom layout handle to a category page, a (basic) Magento 2 module with these additional files and content is needed:
events.xml file to “subscribe” to the event and say which observer should be fired ↵
2. An observer that adds a new layout handle to the page ↵
3. A layout file that adds needed changes to the page ↵