I consider XMLs/Layouts a weakness of mine. So I’m going to use this to make notes of things I learn as time goes on.
Scenario: Stop an xml block from loading
This is the xml reference found in the parent theme. I want to remove the block called category_leftnav
from the sidebar.main
container:
<referenceContainer name="sidebar.main">
<block class="Smartwave\Porto\Block\Template" name="category_leftnav" before="-" template="Mageplaza_LayeredNavigation::layer/category_filter.phtml"></block>
</referenceContainer>
This is the reference I would place in my child theme :
<move element="category_leftnav" destination="delete"/>
Ref: https://magento.stackexchange.com/a/202962/43285, https://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-manage.html