Overriding WordPress Built-In Title-Method W/O Filter To Fix Messy <TITLE> Tag

Posted at



<?php 
     //$title_home = get_bloginfo('name', 'display') . ' - ' . get_bloginfo('description', 'display'); //iCompile - Elad Karako Computer Science Corner
     //$title_not_home = the_title('','',false) . ' | ' . get_bloginfo('name', 'display'); //The Interview - Pretty Funny :) | iCompile
     $title_home = 'iCompile.EladKarako.com - Computer-Science Corner';
     $title_not_home = the_title('','',false) . ' | iCompile.EladKarako.com';
?><title><?php echo is_home() ? $title_home : $title_not_home; ?></title>