0

I'm trying to remove the category title & category images from category view page. However, when i edit the catalog_product_view.xml from the (Infortis Ultimo) theme folder

app/design/frontend/Infortis/base/Magento_Catalog/layout/catalog_product_view.xml

it did not work, but when I edit the catalog_product_view.xml from the vendor folder

/vendor/magento/module-catalog/view/frontend/layout/catalog_category_view.xml

then it works.

I'm trying to get it done through the theme folder, how do i achieve it?

below is the code i need to add.

<referenceContainer name="columns.top">
    <referenceBlock name="page.main.title" remove="true" />
    <referenceBlock name="category.image" remove="true"/>
</referenceContainer>
<referenceContainer name="sidebar.additional" remove="true" />

Thanks!

0

It seems you are changing in wrong File.

The code you want to add is related with category image and sidebar.

app/design/frontend/Infortis/base/Magento_Catalog/layout/catalog_category_view.xml

catalog_category_view.xml is for category's product listing page whereas

catalog_product_view.xml is for Product detail page.

You are changing in different file in vendor folder to see changes but you edit "product_view" in your theme.

  • aha! thanks for noting that. So in the case that catallog_product_view.xml does not exist in the theme folder. I will just copy it from the vendor folder and edit from there? thanks! – Kris Wen Feb 8 at 18:43
  • yes. you should copy from vendor and put it in your theme path. – Abhishek Panchal Feb 8 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.