From e039c39f7373bd8a0d1c0a36e3be40c9392fc3ee Mon Sep 17 00:00:00 2001 From: Tetrakern <26898880+Tetrakern@users.noreply.github.com> Date: Sun, 3 Mar 2024 12:32:43 +0100 Subject: [PATCH] Account for missing parent story in global password note --- single-fcn_chapter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/single-fcn_chapter.php b/single-fcn_chapter.php index bb9c9dfe..396385d5 100644 --- a/single-fcn_chapter.php +++ b/single-fcn_chapter.php @@ -154,7 +154,7 @@ get_header( null, $header_args ); // Password note $password_note = fictioneer_get_content_field( 'fictioneer_chapter_password_note', $post->ID ); - if ( post_password_required() && empty( $password_note ) ) { + if ( $story_post && post_password_required() && empty( $password_note ) ) { $password_note = fictioneer_get_content_field( 'fictioneer_story_password_note', $story_id ); if ( ! empty( $password_note ) && strpos( $password_note, '[!global]' ) !== false ) {