Home › Forums › Support › comments-link on post page This topic has 3 replies, 2 voices, and was last updated 1 year, 6 months ago by Leo. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts December 1, 2020 at 10:14 am #1561483 Darius I use this code from documentation page add_filter( 'generate_header_entry_meta_items', function() { $comments_number = get_comments_number( $post_id ); return array( 'date', 'comments-link', ); } ); add_filter( 'generate_header_entry_meta_items', function( $items ) { if ( is_single() ) { $items = array( 'date', 'comments-link', ); } return $items; } ); why on homepage the comment link is displayed and on single post is not working? December 1, 2020 at 11:28 am #1561760 LeoStaff Customer Support Hi there, Try this for your full function: add_filter( 'generate_header_entry_meta_items', function() { $comments_number = get_comments_number( $post_id ); return array( 'date', 'comments-link', ); } ); add_action( 'wp', function() { if ( is_single() ) { add_filter( 'generate_show_comments', '__return_true' ); } } ); Adding PHP: https://docs.generatepress.com/article/adding-php/ Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ December 1, 2020 at 2:29 pm #1562230 Darius it’s working. thanks December 1, 2020 at 3:56 pm #1562380 LeoStaff Customer Support No problem 🙂 Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In