From 4736a74c48213d6b7796267f38c588e5e1c2397a Mon Sep 17 00:00:00 2001 From: Jake Spurlock Date: Mon, 6 Jul 2020 23:10:45 +0000 Subject: [PATCH] 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 --- src/wp-content/themes/twentytwenty/index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-content/themes/twentytwenty/index.php b/src/wp-content/themes/twentytwenty/index.php index 54700e8862..b3037b660d 100644 --- a/src/wp-content/themes/twentytwenty/index.php +++ b/src/wp-content/themes/twentytwenty/index.php @@ -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();