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' ); }