Optimal title (without plugin)?

Published: On Tuesday, July 24, 2007

Well, finally I have come before the question How to make title more user- (& SEO-) friendly? and the for the answer I didn't have to „wait“ too long :-). Read this:
  echo ( $title = wp_title('', false) ) ? $title . ' | ' : '';
  bloginfo('name'); ?></title>

Although I think it's relatively clear (what the code does), I describe it on the result:

  • On the homepage your title will be: My blog
  • On the article-page (or Page-page): The article | My blog
  • And so on: The Category | My blog, Monthuary 2007 | My blog

I'm quite sure that with this code will become Optimal title plugin unnecessary.


  1. 1.  sonika wrote: On August 31., 2007 comment number 1

    Cool code, thanks a lot!

I quit working with WordPress, comments are closed. My plugins will not be updated any more – at least not by me. Feel free to modify my source codes though… Also I am not able to provide support, sorry. –Kahi