Skip to content

Commit 3cdfc1f

Browse files
committed
Fix footnotes not always being rendered
1 parent a8dfa8c commit 3cdfc1f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

includes/functions/_service-posts.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,13 @@ function fictioneer_collect_footnote( $footnote_id, $content ) {
497497
function fictioneer_append_footnotes_to_content( $content ) {
498498
global $fictioneer_footnotes;
499499

500-
// Only proceed for single posts/pages with footnotes
501-
if ( ! is_singular() || empty( $fictioneer_footnotes ) ) {
500+
// Only proceed for single posts/pages with footnotes and
501+
// check the post ID in case of multiple content calls.
502+
if (
503+
! is_singular() ||
504+
empty( $fictioneer_footnotes ) ||
505+
get_queried_object_id() != get_the_ID()
506+
) {
502507
return $content;
503508
}
504509

0 commit comments

Comments
 (0)