WordPress header.php meta description and title
Sunday, 08 August 2008
I am researching the best meta tags and title for seo on wordpress. I used only following my “M Theme”‘s header.php.
<title>
<?php bloginfo('name'); ?>
<?php if(is_single()){?> » Blog Archive
<?php } wp_title(); ?>
</title>
But I saw some different hints at google webmasters / tools. So I found some codes. Now I test following code in “E theme”‘s header.php
<meta name="description" content="<?php if (!is_home())
{single_post_title('',true);}
else{ bloginfo('name');echo" - "; bloginfo('description');}?>" />
<meta name="keywords" content="" />
<title>
<?php bloginfo('name'); ?>
<?php wp_title(); ?>
</title>
And I also research the faster code.