Support » Theme: OceanWP » Single Post ▸Page Header Title = Hidden

  • Resolved Vad

    (@vadym1)


    Hi!

    Need add Hidden
    Customizing ▸ Blog ▸ Single Post ▸ Page Header Title = Hidden

    For pages+posts, there is already a Hidden:
    Customizing ▸ General Options ▸ Page Title

    But I need to Hidden only for blog pages (Blog Entries and Single Post).

    Disabling with CSS styles is not suitable. I need to remove the extra header h1.

    On the pages of the title h1 is not necessary. But on the pages of the blog you get two headlines, the bottom one is needed, and the top one needs to be removed.

    This code does not fit, it edits the second heading, and I need to edit (delete) the first header: http://docs.oceanwp.org/article/453-alter-the-single-post-heading-tag

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Theme Author oceanwp

    (@oceanwp)

    Hello, see this code: http://docs.oceanwp.org/article/437-disable-the-page-title
    Add “is_home()” like this:

    is_singular( 'post') || is_home()
    Thread Starter Vad

    (@vadym1)

    Many thanks! Working!

    // Disable page title on single posts and blog home page
    function disable_title( $return ) { 
        if ( is_singular( 'post') || is_home() ) {
            $return = false;
        } 
        // Return
        return $return;    
    }
    add_filter( 'ocean_display_page_header', 'disable_title' );
    Theme Author oceanwp

    (@oceanwp)

    You’re welcome 🙂

    Isn’t there any chance that OceanWP devs will allow the customization of where the Title appears?

    I avoid using functions.php at all costs, so today I try to use CSS, not 100% effective.

    Thanks

    Theme Author oceanwp

    (@oceanwp)

    Why don’t you want to use the functions.php file? If you do nothing wrong, you will have no error on your site, and in the worth case, if you do something wrong and you cannot access your site anymore, you will always be able to edit your functions.php file via FTP.

    Hi. I’m no developer, so I avoid to use programming to simple stuff like this. More code at different places = more places to support and remember where I put code.

    I mean… OceanWP has so many customizations… but why not this one?

    Also… I don´t intend to use child themes, as they add another layer of complexity in any future changes. When the main theme changes, I’d have to be always looking and reviewing code.

    All that for just hiding the Title sometimes.

    Theme Author oceanwp

    (@oceanwp)

    Hi, you can do it per post/page, but if you want to disable the title only for a blog archives and single post, it is this code, but if you want just with css, you can use this:

    body.home .page-header, body.single-post .page-header {
        display: none;
    }

    Ok thank you!

    Theme Author oceanwp

    (@oceanwp)

    You are welcome 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Single Post ▸Page Header Title = Hidden’ is closed to new replies.