Without any plugins to optimize your wordpress
author:luanbu
hey,are u using some SEO plugins to optimize your wordpress’s meta. today i wanna tech you how to optimize your wordpress’s without any plugins. it’s so easy and smart. follow me. step1:login your wordpress with admin role. step2:select your theme you want to optimize. step3:select theme editor to edit your theme’s header.php step4:delete some codes just like this:<title><?php bloginfo(’name’); ?><?php wp_title(); ?></title> step5:copy these codes given below,and paste them to place you have deleted those codes’ place in step4 just now. step6:accoding to my explantion which between /* */,to modify some places to fix your blog better. step7:update file.over
<?php if(is_home()) { ?><title><?php bloginfo(’name’);?></title> <meta name=”keywords” content=”INSERT YOUR KEYWORDS” /> <meta name=”description” content=”INSERT YOUR DESCRIPTION” /> <meta name=”robots” content=”index,follow,archive” /> <meta name=”googlebot” content=”noarchive” /><?php }?> /* it’s your index.php, the title is your blog’s name. you must replace INSERT YOUR KEYWORDS and INSERT YOUR DESCRIPTION with your keywords and description , note:not including “” */
<?php if(is_single()) { $keywords=”";$tags = wp_get_post_tags($post->ID);foreach ($tags as $tag ) {$keywords = $keywords . $tag->name . ‘,’;} ?><title><?php single_post_title();echo ‘ - ‘;bloginfo(’name’);?></title> <meta name=”keywords” content=”<?php echo $keywords;?>” /> <meta name=”description” content=”<?php echo $post->post_excerpt;?>” /> <meta name=”robots” content=”index,follow,noarchive” /> <meta name=”googlebot” content=”noarchive” /><?php } ?> /*
it is your post’s page. the title is “your post’s name - your blog’s name” the keywords of post are your tags that you have filled it in the post’s tags when you write this post, and the description is your post’s excerpt that you have filled it in the optional excerpt when write this post */
<?php if(is_page()) {?><title><?php echo wp_title(”,false);echo ‘ - ‘;bloginfo(’name’);?></title> <meta name=”keywords” content=”INSERT YOUR KEYWORDS” /> <meta name=”description” content=”INSERT YOUR DESCRIPTION” /> <meta name=”robots” content=”noindex,nofollow,noarchive” /> <meta name=”googlebot” content=”noarchive” /><?php } ?> /*
it’s about page, the title is “ABOUT - YOUR BLOG’ NAME” you must replace INSERT YOUR KEYWORDS and INSERT YOUR DESCRIPTION with your keywords and description ,note:not including “”
*/
<?php if(is_category()) { ?><title><?php single_cat_title();echo (’ - ‘);bloginfo(’name’);?></title> <meta name=”keywords” content=”<?php single_cat_title();?>” /> <meta name=”description” content=”<?php echo trim(category_description());?>”/> <meta name=”robots” content=”index,archive,follow” /> <meta name=”googlebot” content=”noarchive” /><?php }?> /* it is your category page, the title is “your category’s name - your blog’s name”. the keyword are your category’s name. and description is your category’s descrption that you have fill the description when you created this category */
<?php if ( !is_category()&&is_archive()) { ?><title><?php echo wp_title(”,false);echo (’ Archives’);echo (’ - ‘);bloginfo(’name’); ?></title> <meta name=”keywords” content=”" /> <meta name=”description” content=”<?php echo wp_title(”,false);?> “/> <meta name=”robots” content=”noindex,noarchive,follow” /> <meta name=”googlebot” content=”noarchive” /><?php }?> /* it’s archive page. the title is “archive’s name Archives - your blog’s name ” the keywords you could write or not the description your archive’s name. */
<?php if(is_search()) {?><title><?php echo get_search_query();echo ‘ - ‘;bloginfo(’name’);?></title> <meta name=”keywords” content=”<?php echo get_search_query();?>” /> <meta name=”description” content=”"/> <meta name=”robots” content=”noindex,noarchive,follow” /> <meta name=”googlebot” content=”noarchive” /><?php }?> /* it’s search page. the title is “words you search - your blog’s name” the keywords are words you search the description you could write or not */
you could contact me by email :luanbu#gmail.com or visit my website http://luanbu.org.cn
if you encouter any problems.
About the authorhttp://luanbu.org.cn
Other SEO articles


