in file "your_theme/function.php" add the following code at the end.
function setTitle($title) {
add_filter( 'wp_title', function() use ($title) {return $title;}, 10000 );
}
Done ! From now on, which page should be customized so that you just call the function like this:
setTitle('Hello, this is my custom title');
It does not affect the pages you do not use. Have fun!
0 nhận xét:
Post a Comment