Disable the Page Header on Single Posts

This is a developer-level article. If you’re unfamiliar with PHP and/or editing files, codes and templates, as well as with resolving possible conflict, please seek help from our support for small changes.

If you wish to disable/remove the Page Header on your Single Post Articles on a global level (assuming the Page Header is enabled), use the following PHP snippet:

// Disable page header on single posts
function prefix_disable_page_header( $title ) {
    if ( is_singular( 'post') ) {
        $title = true;
    }
    return $title; 
}
add_filter( 'olympus_hide_title', 'prefix_disable_page_header' );

You can replace is_singular( 'post') by another post type, like is_singular( 'movie') for a Movie Custom Post Type.

All PHP snippets should be added via a child theme’s functions.php file.

Subscribe to our newsletter

Get tips, news, gifts and exclusive promotions directly to your inbox and be the first to know about the latest updates from us. No spam, we guarantee!

Olympus

Blazingly fast, lightweight, fully responsive, SEO-ready, and 100% Vanilla JS WordPress Theme

Facebook YouTube

Our Products

Get Help

Company

Copyright © 2024 | Created with Olympus & Olympus Blocks