Information: I'm using Magento 2.1 on CentOS Linux, my theme is a child of the built-in Luma theme.
When the theme I made is active, I want some blocks to be removed. Let's say I want to remove the SKU number from the product page.
What I do is:
In my theme folder, I add a file called
Magento_Catalog/layout/catalog_product_view.xml, with the following content
<?xml version="1.0"?> <page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="product.info.sku" remove="true" /> </body> </page>
I change the
100.(x+1).0(so for example if the current version is
100.2.0I change it to
100.3.0). To be honest, don't really know if this is necessary.
I delete the
I run the following commands from the Magento root:
sudo php bin/magento cache:clean sudo chown -R <user-of-Magento>:<group-of-that-user> * sudo php bin/magento setup:static-content:deploy nl_NL en_US sudo chown -R <user-of-Magento>:<group-of-that-user> *
But the block is still there! Unchanged. I tried other blocks, like the add to cart button, but also without success.
What should I do? Thanks in advance.