Bundled theme: Ensure appropriate title for author archives for that don't have posts.

Rather then displaying `Author: `, show `Nothing Found`.

Fixes #50421.

Props SGr33n, williampatton, ianbelanger, rebasaurus, priyomukul, virginienacci, audrasjb.



git-svn-id: https://develop.svn.wordpress.org/trunk@48355 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jake Spurlock 2020-07-06 23:10:45 +00:00
parent 56f5be4984
commit 4736a74c48

View File

@ -47,6 +47,8 @@ get_header();
} else {
$archive_subtitle = __( 'We could not find any results for your search. You can give it another try through the search form below.', 'twentytwenty' );
}
} elseif ( is_archive() && ! have_posts() ) {
$archive_title = __( 'Nothing Found', 'twentytwenty' );
} elseif ( ! is_home() ) {
$archive_title = get_the_archive_title();
$archive_subtitle = get_the_archive_description();