I am trying to remove the category title on category pages on Magento 2.1.8. I got this page vendor/magento/module-catalog/view/frontend/layout/catalog_category_view.xml and removed this-
<referenceBlock name="page.main.title">
<arguments>
<argument name="id" xsi:type="string">page-title-heading</argument>
<argument name="add_base_attribute_aria" xsi:type="string">page-title-heading toolbar-amount</argument>
</arguments>
<block class="Magento\Catalog\Block\Category\Rss\Link" name="rss.link" template="Magento_Catalog::category/rss.phtml"/>
</referenceBlock>
I took that file and added it to app/design/frontend/mytheme/theme/module-catalog/view/frontend/layout/catalog_category_view.xml
I cleaned and flushed the cache and it didn't work. So I did a little bit of research and came across this-
https://stackoverflow.com/questions/42220806/magento2-how-can-override-vendor-module-catalog-to-magento-default-theme
and it recommended putting it in this folder
app/design/frontend/mytheme/theme/Magento_Catalog/module-catalog/view/frontend/layout/catalog_category_view.xml
I tried that, flushed and cleaned the cache and still nothing. What am I doing wrong?
Best Answer
Turns out you can't just delete the code. I kept the code in there and added
<referenceBlock name="page.main.title" remove="true"/>
and it removed it.