From c5283429c7e3c8603cc6e5c91c2dd260e56cd3c6 Mon Sep 17 00:00:00 2001 From: Chuck Grimmett Date: Fri, 16 Jan 2026 14:57:38 -0500 Subject: [PATCH] add null check for --- jsonfeed-wp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonfeed-wp.php b/jsonfeed-wp.php index 1c6eff7..0e6d4ea 100644 --- a/jsonfeed-wp.php +++ b/jsonfeed-wp.php @@ -90,7 +90,7 @@ function json_feed_links_extra( $args = array() ) { $id = 0; $post = get_post( $id ); $comments = apply_filters( 'jsonfeed_comments_feed_enable', true ); - if ( $comments && ( comments_open() || pings_open() || $post->comment_count > 0 ) ) { + if ( $post && $comments && ( comments_open() || pings_open() || $post->comment_count > 0 ) ) { $title = sprintf( $args['singletitle'], get_bloginfo( 'name' ), $args['separator'], the_title_attribute( array( 'echo' => false ) ) ); $href = get_post_comments_feed_link( $post->ID, 'json' ); }