Dynamic page titles in WordPress

If you are developing a custom theme in Wordpress and want custom page titles to display in your header or at the top of the page using the wp_title filter, you will have noticed that Wordpress by default adds the site title to the page title.