Skip to content

Disabling The Page Header Title

In this article

    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)”.

    Disable for Specific Post Types

    You can also turn off the Page Header for specific post types. For example, if you want to hide the page header title on blog posts only, a common choice when building a custom single post template, you can do this using the Blog > Single Post > Page Header Title toggle.

    Post Types Unlimited

    When using the Post Types Unlimited plugin for custom post types and taxonomies, you can hide the page header title by setting the page header style to Hidden, as shown in the screenshot below.

    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' );
    Related Articles
    Back To Top