// If on the front page, use the site title.
} elseif ( is_front_page() ) { $title['title'
] =
get_bloginfo( 'name', 'display'
);
// If on a post type archive, use the post type archive title.
} elseif ( is_post_type_archive() ) { $title['title'
] =
post_type_archive_title( '', false
);
// If on a taxonomy archive, use the term title.
} elseif ( is_tax() ) { $title['title'
] =
single_term_title( '', false
);
/*
* If we're on the blog page that is not the homepage
* or a single post of any post type, use the post title.
*/
} elseif ( is_home() ||
is_singular() ) { $title['title'
] =
single_post_title( '', false
);
// If on a category or tag archive, use the term title.
} elseif ( is_category() ||
is_tag() ) { $title['title'
] =
single_term_title( '', false
);