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┬áTitle and set the style to “hidden”.

hide-page-header

Disabling Via Page Settings

The quickest and easiest way to disable the Page Title is via the built-in page settings, have a look at the screenshot below:

disable-page-title

Disabling Via Filter

Now if you are a developer and want more control over the page title you can use the theme filter called “wpex_display_page_header” 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 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.

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!