From 3cdfc1f0b3228e5a92177a5fcfee56a765c7458c Mon Sep 17 00:00:00 2001 From: Tetrakern <26898880+Tetrakern@users.noreply.github.com> Date: Sun, 20 Oct 2024 23:46:35 +0200 Subject: [PATCH] Fix footnotes not always being rendered --- includes/functions/_service-posts.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/functions/_service-posts.php b/includes/functions/_service-posts.php index 843a1640..9e49200b 100644 --- a/includes/functions/_service-posts.php +++ b/includes/functions/_service-posts.php @@ -497,8 +497,13 @@ function fictioneer_collect_footnote( $footnote_id, $content ) { function fictioneer_append_footnotes_to_content( $content ) { global $fictioneer_footnotes; - // Only proceed for single posts/pages with footnotes - if ( ! is_singular() || empty( $fictioneer_footnotes ) ) { + // Only proceed for single posts/pages with footnotes and + // check the post ID in case of multiple content calls. + if ( + ! is_singular() || + empty( $fictioneer_footnotes ) || + get_queried_object_id() != get_the_ID() + ) { return $content; }