Site logo

Archived topic

Show Reading Time on Post Only

5 replies · Started by Danar Virdaus on January 26, 2021

Viewing posts 1–6 of 6

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

syntax error, unexpected ';' :D

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

Ahh It Works! :)
Thank You Natalie ;)

Thanks Natalie :)

This archived topic is closed to new replies.