From 1bef82b3e6e0466075034d9021cd3cb1a6d78c74 Mon Sep 17 00:00:00 2001 From: Tetrakern <26898880+Tetrakern@users.noreply.github.com> Date: Thu, 10 Aug 2023 01:34:45 +0200 Subject: [PATCH] Fix comment anchor outside posts --- includes/functions/_content_helpers.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/functions/_content_helpers.php b/includes/functions/_content_helpers.php index dc041ca7..14fe8778 100644 --- a/includes/functions/_content_helpers.php +++ b/includes/functions/_content_helpers.php @@ -1218,11 +1218,13 @@ if ( ! function_exists( 'fictioneer_get_post_meta_items' ) ) { // Comments node if ( ! $no_comments && $comments_number > 0 ) { + $comments_link = is_single() ? '#comments' : get_the_permalink() . '#comments'; + ob_start(); // Start HTML ---> ?>