/ Published in: PHP
Used in my post on how to optimize WordPress, which can be found here: http://www.brettwidmann.com/2010/01/optimizing-your-wordpress-site-pt-2/
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<title><?php if (is_home () ) { bloginfo('name'); } elseif ( is_category() ) { single_cat_title(); echo ' - ' ; bloginfo('name'); } elseif (is_single() ) { single_post_title(); } elseif (is_page() ) { bloginfo('name'); echo ': '; single_post_title(); } else { wp_title('',true); } ?></title>
URL: http://www.brettwidmann.com