Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove H1 title from CMS pages and category pages in Magento 2

I want to add the H1 title along with the description in the description filed for CMS pages and category pages.

How can I remove the H1 title for these pages but keep the H1 title for products pages?

like image 675
Gordova Avatar asked Feb 20 '16 06:02

Gordova


People also ask

How do I get rid of page title wrapper in Magento 2?

For removing the tittle from the home page you can just add <referenceBlock name="page. main. title" display="false"/> in your cms_index_index.

How can I remove default welcome message in Magento 2 programmatically?

Go to Other Settings > Header > Welcome Text Under Other Settings, select Header. Under Header section, edit the Welcome Text field to change the default Magento welcome message.

How do I change page title in Magento 2?

Go to the Admin panel > Content > Pages > Choose the Homepage > In the field "Page Title" add a new title you want to show > click on Save button.

How do I delete categories in Magento 2?

To remove a category, do as follows:Click on the category that you want to delete. In the example above, Training is the category chosen to be removed. Go to the Delete button that appears next to the Save button. Tap Delete and click “OK” in the dialog box that asks you to confirm the deletion.


2 Answers

For removing the tittle from the home page you can just add <referenceBlock name="page.main.title" display="false"/> in your cms_index_index.xml. You can also use display true and false from where you want.

like image 157
Shine Avatar answered Sep 28 '22 01:09

Shine


Seeing as still nobody's posted what to edit for category pages, the XML file to edit is in /vendor/magento/module-catalog/view/frontend/layout/catalog_category_view.xml. The block to edit is pretty much the same as for CMS pages:

<referenceBlock name="page.main.title" display="false">

like image 38
user7290573 Avatar answered Sep 28 '22 00:09

user7290573