0

How do I remove this section from homepage?

<main id="maincontent" class="page-main"></main>

All of my home page content is done in blocks and I'm now stuck with this large empty maincontent section on the homepage that I can't seem to get rid of.

I'm on Magento 2.2.1

1

Try This

app/code/VendoreName/ModuleName/view/frontend/layout

cms_index_index.xml

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="content" remove="true"/>
    </body>
</page>
0

have you tried in cms_index_index.xml something like this?

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="wtite your container name" remove="true" />
    </body>
</page>
1
  • Having trouble with where that file should be placed and what the block name is for that maincontent area – user1155594 Feb 23 '18 at 12:44

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.