From 48907b723d50ab52ce9fce825eb64d2988ed4735 Mon Sep 17 00:00:00 2001 From: Jake <6040147+shakyjake@users.noreply.github.com> Date: Thu, 31 Jul 2025 17:30:55 +0100 Subject: [PATCH 1/2] Update template-tags.php Fix warning for when post has no author. Resolves #1066 --- template-tags.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/template-tags.php b/template-tags.php index 95a41f1a..8f65f8f5 100644 --- a/template-tags.php +++ b/template-tags.php @@ -126,7 +126,9 @@ function coauthors__echo( $tag, $type = 'tag', $separators = array(), $tag_args // Fallback to user_login if we get something empty if ( empty( $author_text ) ) { - $author_text = $i->current_author->user_login; + if(!is_bool($i->current_author)){ + $author_text = $i->current_author->user_login; + } } // Append separators From 8d350635f801191677ebecd01318731a88400f26 Mon Sep 17 00:00:00 2001 From: Jake <6040147+shakyjake@users.noreply.github.com> Date: Wed, 22 Oct 2025 14:47:49 +0100 Subject: [PATCH 2/2] Update template-tags.php Co-authored-by: leogermani --- template-tags.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-tags.php b/template-tags.php index 8f65f8f5..7d2eb0ce 100644 --- a/template-tags.php +++ b/template-tags.php @@ -125,7 +125,7 @@ function coauthors__echo( $tag, $type = 'tag', $separators = array(), $tag_args } // Fallback to user_login if we get something empty - if ( empty( $author_text ) ) { + if ( empty( $author_text ) && is_object( $i->current_author ) && ! empty( $i->current_author->user_login ) ) { if(!is_bool($i->current_author)){ $author_text = $i->current_author->user_login; }