Hiding the page-header.php/ Sage Page titles

Hi Everyone,

I’m new to using Sage, I think is fantastic it saves me a lot time, but I’m still getting use to it. I notice that every time I create a new page the Title of the page appears on the actual web page’s front end. For Example if, I create a page name Home, the title Home will appear on the page, if I create a page name About, the title About appears on the page etc. I know that this si happening due to the page-header.php template, but I don;'t think deleting it would be best practice. I was wondering if there’s a way where I can permanently hide it, so every time I create a page I don’t have to be going through this .

       <?php use Roots\Sage\Titles; ?>

          <div class="page-header">
         <h1><?= Titles\title(); ?></h1>
      </div>

Thanks All,
Ron

I am hiding/disabling titles with a plugin. The best one (in my opinion) is the Disable Title plugin. It hadn’t been updated for some time but there aren’t many moving parts and it is one of the only few plugins that actually still work with recent WordPress versions.

Thank you so much! It does work, but do you have happen to know another method may be in actual PHP code?

titles.php is included in functions.php file in Sage8

Sage is a starter theme, so do whatever you want with it. Not using that template? Get rid of it. Don’t need it on certain templates? Just get rid of the include or use PHP conditionals.

2 Likes

Thank you! Your advice helped me fix the problem,