1

I am needing to remove the main page title "Create New Customer Account" from the registration page.

I see everywhere that I need to add the line below somewhere but where?

<referenceBlock name="page.main.title" remove="true" />

Essentially I'd like to remove the following div from the page.

    <h1 class="page-title">
        <span class="base" data-ui-id="page-title-wrapper">Create New Customer Account</span>    </h1>
    </div>

Is this possible?

2 Answers 2

1

You can remove page title from layout file i.e customer_account_create.xml

Theme level:

create

app/design/frontend/{Package}/{my-theme}/Magento_Customer/layout/customer_account_create.xml

<?xml version="1.0"?>
<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="page.main.title" remove="true" />
    </body>
</page>

Module level:

create:

app/code/{Vendor}/{Module}/view/frontend/layout/customer_account_create.xml

<?xml version="1.0"?>
<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="page.main.title" remove="true" />
    </body>
</page>
1

You need to override layout file in your custom theme with below code

app/design/frontend/Vendor/yourtheme/Magento_Customer/layout/customer_account_create.xml

<?xml version="1.0"?>
<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="page.main.title" remove="true" />
    </body>
</page>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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