Page Titles

# Default value.
$page_title = 'Untitled';

if (is_404()) {
    $page_title = '404 Page Not Found';
} elseif (is_search()) {
    if (get_search_query() == ''){
        $page_title = 'Search Results for Everything';
    } else {
        $page_title = 'Search Results for: "' . get_search_query() . '"';
    }
} elseif (is_home()) {
    $page_title = get_bloginfo('name');
} elseif (is_single() || is_page()) {
    $page_title = get_the_title();
} elseif (is_category()) {
    $page_title = single_cat_title("", false);
} elseif (is_tag()) {
    $page_title = single_tag_title("", false);
} elseif (is_day() ) {
    $page_title = 'Daily Archive ' . get_the_date();
} elseif (is_month()) {
    $page_title = 'Monthly Archive ' . get_the_date('F Y');
} elseif (is_year()) {
    $page_title = 'Yearly Archive ' . get_the_date('Y');
}