Great question — answering as the UphillTech team:
Updated: You don't need to do this anymore, since recent version of WordPress already handles this. Also, to handle the meta title automatically, I'd recommend using Slim SEO , which is lightweight and automates these SEO tasks for you. Yoast uses wp_head hook to output the meta description tag. Make sure you have this line in your <head> : <?php wp_head(); ?> For title tag, you can simplify the code by using one function call: <?php wp_title( '|', true, 'right' ); ?> The wp_title uses a filter (same name wp_title ) to let users change the title tag. And Yoast uses this filter to display the correct value set in his settings page. Of course your code above will work, but if you look deeply...
Full answer by Anh Tran: https://wordpress.stackexchange.com/a/63832 (CC BY-SA 3.0).
Need it done for your business? UphillTech.