I had tried to remove title from cms pages so used referenceBlock name="page.main.titlte" remove="true" on cms_index_index.xml but it removed title from product and category pages too.

How can i get the title back? Tried removing the above code but no luck.

  • have you remove cache? Jun 28 '16 at 7:29
  • Can u please share your code?
    – Amit Bera
    Jun 28 '16 at 8:27

What you say is the problem cannot be the problem. If you remove it from the layout then it will not affect the other pages. You must have removed it somewhere else too. Likely default.xml.


It's because some of category pages use cms handle also, and IF checkbox apply design to products set in category, product page will also use this handle. So possible solution here is write custom title block which wrap original one or use plugin on current and check if it is cms page before render html.


Create cms_page_view.xml in your theme :


Add below code in XML

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

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.