I wish to change the format title in header in one of my wordpress websites. I know I can define a custom function to change that. I tried that, that is not working my template. Finally, I found a cleanest and easiest way to do, without writing a single line of code. That is to install Yoast SEO plug-in. This plug-in can allow the user to define page title in header for each page and post. That is very flexible. Moreover, it has a lot of placeholder too, such as site title, page title and post title.