Looking to optimize your WordPress title? While this blog will probably not get to caught up in covering search engine optimization, there are definitely a few tweaks that you can make to your existing WordPress theme that will help optimize your blog’s search engine potential. In this post I’m going to cover a quick adjustment that you can make to your title tag to show a more optimal title.

Optimize Your WordPress Title

By default, your WordPress theme will likely come with a pretty standard code for your blog’s title. It probably looks something like the following:

<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>

Unfortunately this is not the best way to code your title for your WordPress. Ideally, you’ll want a more search engine friendly way to display a custom title for each page of your WordPress blog. In order to achieve this, here is the code I recommend using:

<title><?php if (is_home () ) { bloginfo(‘name’); }
elseif ( is_category() ) { single_cat_title(); echo ‘ - ‘ ; bloginfo(‘name’); }
elseif (is_single() ) { single_post_title();}
elseif (is_page() ) { single_post_title();}
else { wp_title(‘’,true); } ?></title>

This code will actually display a custom title for each different type of page on your blog automatically.

If you’re truly ambitious, you can actually use a plugin that will do all the dirty work for you. That plugin is called WordPress SEO, and it will help automate the process for displaying completely custom meta tags for each page of your blog, including the title field.

Kyle Eslick is WordPress enthusiast who took his passion for WordPress to the next level in 2007 by launching WPHacks.com as a place to share hacks, tutorials, etc. Connect with Kyle on Twitter or Google+!

  • Pingback: 63 Essential Wordpress Hacks, Tutorials, Help Files and Cheats | Speckyboy - Wordpress and Design

  • Pingback: 63 essenziali Wordpress Hacks, Tutorials, Help Files e Cheats : technorati.it

  • Pingback: Wordpress Tutorials/Hacks « The house of software freeware

  • Pingback: 155 Wordpress Resources, Tutorials, Plugins, Themes, AJAX, Podcasting…WP Monster List | Speckyboy - Wordpress and Design

  • Pingback: IndoProTech.com

  • Pingback: 63 correções, tutoriais, arquivos de ajuda e dicas essenciais para Wordpress | Rafael Bernard Araújo

  • Pingback:   Table Of Contents Of Wordpress Tutorials, Helps, Tips and Tricks by aComment.net

  • Pingback: Tutoriale si hack-uri pentru wordpress ( lista mare ) at elbandito.us

  • Pingback: Wordpress Hacks, Guides and Tricks | TechnoBuzz.net

  • Pingback: WordPress ?? ??? ??? snippet

  • Pingback: WordPress ?? ??? ??? tutorial

  • Pingback: Top 30 Most Wanted Wordpress Tricks and Hacks | Make Money Blogging Experiment

  • Pingback: Wordpress ile ilgili 155 kaynak « YEAH28 - Her ?ey Sizin ?çin

  • Pingback: Best of WordPress Tutorials – More than 100 recourses | Tutorials | .:Lirent.net Hacks:. | All about Web 2.0, SEO, PHP5, Ajax, Adsense, Unix/Linux, Free Stuff, OpenSource, Designs, Wordpress, Hi-Tech etc

  • Pingback: 30+ (More) Most Wanted Wordpress Tips, Tricks and Hacks | Wordpress

  • http://techpp.com Raju

    Real useful tip!!

  • Pingback: 135+ Ultimate Round-Up of Wordpress Tutorials | About Us | instantShift

  • Pingback: 36 New Wordpress Tips, Tricks, Tutorials & Hacks | TechnoBuzz.net

  • http://codytaylor.org Cody Taylor

    Good tip. I’ve actually been using the all in one seo plugin for quite some time and it’s great.

  • http://www.kypoth.com/infoblog Alex

    Most handy tip, just what I was looking for.
    I tweaked it a tiny bit to use a » instead of the dash and had a little problem – I had copied and pasted the code above into Notepad and instead of the single quote characters (‘ ‘), it pasted little 6 and 9′s. I had to replace these with the single quotes and it works fine.
    Thanks again,
    Alex.

    • http://www.mmuzik.com mMuzik

      all in seo pack more useful for beginners. but this is nice article also.

      • http://glennfriesen.com/blog/ Glenn Friesen

        Mind to explain why it’s more useful for beginners than advanced SEOs/web developers? To me, it seems equally useful for both the expert and the hobbyist.

        Much thanks,

        Glenn

  • didid

    Hi, nice post.
    In order to avoid duplicate content, I try to include pagination number on title. What is the codex on WP 2.6 and higher? I use “?php echo $paged; ?” but the first page always shows “0″. In WP 2.3 it works. Please help. thanks

  • http://wsubiektywie.pl szuman

    Good tip. Thanks

  • http://waterlife-fiyatlari.blogcu.com/ waterlife

    all in seo pack more useful for beginners.

  • http://youjizzyoujizz.com Sanjay

    Nice one bro! The Seo plug did the trick much easier. Thanks for sharing this great information

  • jam

    thanks so much ! i hate plugin so i will use this code instead

  • http://node.technohub.in Naveen

    as you mentioned All-In-One SEO Pack is one of the best plugin for any WordPress blog. This really increase the SEO of your blog. I personally advice it to any blogger and I have this plugin installed in my blog. Thanks for the useful tip by the way :)

  • http://www.yetkilisinden.com cesi

    i couldnt succes on PHP 5.3.2, any body can help ? thank you

  • http://dailysmspk.com/ Usman

    I like to use code instead of plugins

  • VoIP Writer

    I don’t want to continue my blog title after my page title but i don’t know how to do it. I am using All In One Seo Pack plugin and i had removed the %blog_title% which was after %page_title%. But it is still continuing. In header.php title code is, and in page.php title is . What should i do, so the blog title will not continue after page title.