Create the Perfect Title Tag in WordPress Without a Plugin
If you’re familiar with WordPress, chances are you have heard of the various SEO-related plugins that allow you to tweak your meta-data. These plugins are very friendly, and some of them have been coded quite well, but they do tend to load your site with unnecessary markup and slow it down a bit. As you know, a well-optimized title tag can bring you heaps of SEO goodness.
If you want, you can certainly install a plugin like HeadSpace that will allow you to control the title, description and keywords on pages and posts.
<title><?php if (function_exists('is_tag') && is_tag()) { echo 'Tag Archive for "'.$tag.'" - '; } elseif (is_archive()) { wp_title(''); echo ' Archive - '; } elseif (is_search()) { echo 'Search for "'.wp_specialchars($s).'" - '; } elseif (!(is_404()) && (is_single()) || (is_page())) { wp_title(''); echo ' - '; } elseif (is_404()) { echo 'Not Found - '; } if (is_home()) { bloginfo('name'); echo ' - '; bloginfo('description'); } else { bloginfo('name'); } ?></title>
Big thanks to Perishable Press for their original post on this.
Related posts:
- 9 Crucial SEO and Social Plugins to Install with WordPress Plus some other tips and strategies to help maximize...
- 5 Good Reasons Why Your Business should use WordPress Consider WordPress for your next business website WordPress is...
Related posts brought to you by Yet Another Related Posts Plugin.
