Wordpress - change title of the post in the header of the page

0

In this link: link you will see that on the image is the title of the post. Home I would like to put a code in Wordpress so that, just when accessing a post, it switches to "News". On the other pages, it's to stay the way it is.

    
asked by anonymous 28.05.2017 / 03:38

1 answer

1

You can use the "wp_title" filter. In your functions.php file you can insert something like:

function trocar_titulo($title){
    if(is_single()){
        return "Notícias";
    }
    return $title;
}
add_filter( 'wp_title', 'trocar_titulo', 10, 2 );

Ref: link

    
30.05.2017 / 14:19