Search Suggestions

      Hide the page title in Drupal 8

      On Drupal websites, it is standard to display the page title on each page. The page title is simply the main heading of the page, and is usually formatted with a H1 tag.

      In some cases, you may not want to display the page title – the home page is a common example where you may want to hide the page title altogether. In other cases, you may want to hide the page title on a range of different pages and content types.

        In Drupal 8, the page title is displayed using a block – so the simplest way to hide the page title in Drupal 8 is simply to configure the block so it is not displayed on the pages where you want to exclude it:

        Drupal 8 - block layout showing the Page title block

        Simply click Configure next to the Page Title block, and you can control its display just like any other Drupal block. The example below shows how to hide the Page title for the front page (using is Drupal’s way for us to specify the front page of the site):

        Drupal 8 - control visibility settings for the Page title block

        Of course, this is not the only way to hide the Page title. You could also try one of the following:

        • Use a specific module, such as Exclude Page Title, which provides you with fine grained control over where the page title should and shouldn’t show. Note – at the time of writing the Drupal 8 version of this module is still in alpha.
        • Use CSS to set display: none on the title on those pages where it should be hidden.
        • Some themes offer the option to hide the page title on the front page (although this is not the only reason to choose a theme!).
        • Use modules such as Panels which allow you to disable (or override) the Page Title.
        • Edit the appropriate template file in your theme (e.g. page-title.html.twig).
        • Add additional instances of the Page Title block to your site, and set different visibility settings for each. Be careful to make sure that only one instance of the block shows on each page!

        Lesson Subject –
        Related Lessons – 248

        Leave a Reply

        Your email address will not be published. Required fields are marked *

        More Fields

        Parent lesson NID

        Drupal CID

        Drupal Parent CID

        Additional Info

        Search Suggestions

            Join our mailing list

            Mailing List
            presentation-icon

            Sample Graphic for other Call To Action Purposes

            Sample Graphic for other Call To Action Purposes

            Scroll to Top