Posted By

visualadvance on 02/21/11


Tagged

wordpress title tag seo


Versions (?)

Wordpress: SEO Title Tag Without Plugin


 / Published in: PHP
 

URL: http://www.ceoblogwatch.com/2009/01/25/wordpress-title-tags/

  1. <title>
  2. <?php if ( is_home() ) { ?><?php bloginfo('name'); ?> | <?php bloginfo('description'); ?><?php } ?>
  3. <?php if ( is_search() ) { ?><?php echo the_search_query(); ?> | <?php bloginfo('name'); ?><?php } ?>
  4. <?php if ( is_single() ) { ?><?php wp_title(''); ?><?php } ?>
  5. <?php if ( is_page() ) { ?><?php wp_title(''); ?> | <?php bloginfo('name'); ?><?php } ?>
  6. <?php if ( is_category() ) { ?>Archive <?php single_cat_title(); ?> | <?php bloginfo('name'); ?><?php } ?>
  7. <?php if ( is_month() ) { ?>Archive <?php the_time('F'); ?> | <?php bloginfo('name'); ?><?php } ?>
  8. <?php if ( is_tag() ) { ?><?php single_tag_title();?> | <?php bloginfo('name'); ?><?php } ?>
  9. </title>

Report this snippet  

You need to login to post a comment.