Home › Forums › Support › Show Reading Time on Post Only This topic has 5 replies, 3 voices, and was last updated 3 years, 3 months ago by David. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts January 26, 2021 at 4:49 am #1634022 Danar Virdaus Hello, I use this code to show estimated reading time: https://generatepress.com/forums/topic/creating-an-estimated-reading-time/page/2/#post-647138 How to show estimated reading time only on single posts? With that codes, it showed on both single posts and archives. thank you in advance π January 26, 2021 at 6:06 am #1634105 Natalie You could try this add_filter( 'generate_post_date_output', function( $output ) { if(is_single() { $output .= '<div class="read-time">Reading time: ' . tu_estimated_reading_time() . '</div>'; } return $output; } ); January 26, 2021 at 6:15 am #1634117 Danar Virdaus syntax error, unexpected ‘;’ π January 26, 2021 at 6:18 am #1634124 Natalie Sorry – I missed a closing bracket add_filter( 'generate_post_date_output', function( $output ) { if(is_single()) { $output .= '<div class="read-time">Reading time: ' . tu_estimated_reading_time() . '</div>'; } return $output; } ); January 26, 2021 at 6:20 am #1634128 Danar Virdaus Ahh It Works! π Thank You Natalie π January 26, 2021 at 7:14 am #1634379 DavidStaff Customer Support Thanks Natalie π Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In