Posted By

jhonqwerty on 10/19/10


Tagged

wordpress title


Versions (?)

Wordpress variable title tag


 / Published in: PHP
 

A simple set of conditions to get dynamic title tags in a wordpress template.

  1. <title><?php bloginfo('name');?> - <?php if(is_home()):?><?php bloginfo('description');?><?php endif;?><?php if(is_category()):?><?php single_cat_title();?><?php endif;?><?php if(is_single()||is_page()):?><?php the_title();?><?php endif;?></title>

Report this snippet  

You need to login to post a comment.