• Hello, I would like to change the title of my blog’s homepage. This is showing ‘recent posts’ and I would like to change it to “blog”. THANKS!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Try to add the below code to the child theme’s functions.php file and check it works or not –

    function prefix_page_header_title( $title ) {
    
        if ( !is_front_page() && is_home() ) {
            $title =  'Blog'
        }
    
        return $title;
    }
    add_filter( 'ocean_title', 'prefix_page_header_title', 20 );
    • This reply was modified 4 years, 12 months ago by Amit Singh.
    Thread Starter Santos

    (@amandas2)

    Hello, unfortunately it didn’t work, it’s giving error on the following line: {
    $title = ‘Blog’
    }

    Thanks!

    • This reply was modified 4 years, 12 months ago by Santos.

    Kindly use the updated code –

    function prefix_page_header_title( $title ) {
    
        if ( !is_front_page() && is_home() ) {
            $title =  'Blog';
        }
    
        return $title;
    }
    add_filter( 'ocean_title', 'prefix_page_header_title', 20 );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HOW TO CHANGE THE TITLE OF THE BLOG HOME PAGE.’ is closed to new replies.