Skip to content

Disabling The Page Header Title

In Total you can quickly and easily disable the page title either on a per-page/per-post basis or using a custom filter in a child theme to disable it using conditional statements for more advanced usage.

Disable Globally

If you want to remove the page header from ALL pages, posts and archives on the site you can do so via the Customizer at Appearance > Customize > General Options > Page Header Title and change the style to “Hidden (Disabled)”.

Disabling on a Per Page/Post Basis

You can also disable the page header title on a per post or page basis using the Theme Settings metabox as shown in the screenshot below:

Disabling Via Filter (Code)

Now if you are a developer and want more control over the page title you can use the theme filter called totaltheme/page/header/is_enabled to show and hide the page title accordingly. See some great example functions below:

All custom functions should be added to a child theme’s functions.php or via the code snippets plugin so you don’t lose your edits in the future when you update your theme.

Disable Page Title For Products

Here is an example function using a conditional to hide the title for all singular posts under the “product” post type. You can of course tweak this function to fit your needs. It doesn’t just have to be products, you can use any WordPress conditional.

add_filter( 'totaltheme/page/header/is_enabled', function( bool $check ): bool {
    if ( is_singular( 'product' ) ) {
        $check = false;
    return $check;
} );

Disable Page Title On All Pages and Posts (everywhere)

The following snippet can be added to your child theme’s functions.php file to disable the main page header (title) on your entire site. In most cases this isn’t ideal, but some customers have requested it so here is how you do it!

add_filter( 'totaltheme/page/header/is_enabled', '__return_false' );
Back To Top