• Those of you wanting to fix the issue of this plugin stating “0 minutes and less than a minute…”, the solution is incredibly easy, thanks to lovely-written code. 🙂

    Simply find this code:

    if($time == "1") {
    			if($seconds >= 30) {
    				$minutes = $minutes + 1;
    			}
    			$estimated_time = $estimated_time.' '.$minutes . ' minute'. ($minutes == 1 ? '' : 's');
    		}
    		else {
    			$estimated_time = $estimated_time.' '.$minutes . ' minute'. ($minutes == 1 ? '' : 's') . ', ' . $seconds . ' second' . ($seconds == 1 ? '' : 's');
    		}
    		if($minutes < 1) {
    			$estimated_time = "Less than a minute";
    		}
    
    		$estimated_time = $estimated_time.$suffix;
    
    		echo $estimated_time;

    then simply change this part from:

    if($minutes < 1) {
    			$estimated_time = $estimated_time " Less than a minute";

    to

    if($minutes < 1) {
    			$estimated_time = "Less than a minute ";

    🙂 Enjoy the day!!

    https://wordpress.org/plugins/post-reading-time/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘SOLUTION to "LESS THAN A MINUTE" Found’ is closed to new replies.