The Bootstrap
[resolved] [closed] How to remove page title? (3 posts)

  1. Domat
    Posted 3 years ago #

    How do I remove the page title from the top of the page?

    For instance the Home page will have HOME under the menu.


  2. Domat
    Posted 3 years ago #

    I solved that by changing to

    <?php //the_title( '<h1 class="entry-title">', '</h1>' ); ?>

    in content-page.php but can't figure out how to remove the line.

    So How do I remove the line:)?

  3. jmjf
    Posted 3 years ago #

    content-page.php will be called for every page, so if you want to remove the title for every page, you can make a copy of partials/content-page.php into a partials directory in your child theme and remove the line.

    If you just want to remove the title for the home page, you can write a custom page template for your home page. I did that and didn't call partials/content-page.php because I'm doing some very different stuff on the page.

    Another option might be to set it up in CSS. The <body> tag for the home page includes the class "home" so you might be able to write CSS in styles.css that will affect h1.entry title only when in body.home. Maybe something like body.home > h1.entry-title { make it invisible } -- but I haven't tested that CSS, just am speculating based on some other examples I've seen.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic