// If it's a search, use a dynamic search results title.
} elseif ( is_search() ) { /* translators: %s: Search query. */
$title['title'
] =
sprintf( __( 'Search Results for “%s”'
),
get_search_query() );
// 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() ) {