Reading time

Home Forums Gillion Theme Reading time

Home Forums Gillion Theme Reading time

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • nicolaivarney
    Participant

    Ah hi guys,

     

    I have searched and searched, but i can’t seem to find where to get reading time for a blogpost. I’m sorry to bother you with this stupid question, but i’ve searched for a long time now..

     

    Hope you can help!

    Hi @nicolaivarney,

     

    I hope you are well today and thank you for your question.

     

    The theme automatically calculates post reading time using below code based on the number of words contained in the post.

     

    function gillion_read_time( $string ) {
    	$string = strip_tags($string);
    	$string = preg_replace('/\s+/', ' ', trim($string));
    	$words = explode(" ", $string);
    	$words = count($words);
    
    	$min = floor($words / 200);
    	$sec = floor($words % 200 / (200 / 60));
    	if( $min < 1 ) {
    		return '1 min <span>'.esc_html__( 'read', 'gillion' ).'</span>';
    	}
    	if( $sec >= 20 ) {
    		$min++;
    	}
    	return $min . ' min <span>'.esc_html__( 'read', 'gillion' ).'</span>';
    }

     

    Best regards,
    Shufflehound team

    nicolaivarney
    Participant

    I’m very well!

    I forgot to praise your beautiful site, thanks for the purchase – i’m gonna love it.

     

    Ah. Is it possible to change this? My site is a food-blog, and I would like to change the reading time to be “preparation time” instead.. 🙂

     

     

    nicolaivarney
    Participant

    Thanks – Ill try for a bit. Thanks for reply

     

    Have a nice day!

    You are most welcome here 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

Popular choice

Professional Developers At Your Fingertips!

If you need services beyond standard support, we've got your back!

Services we offer:

Demo setup
Advanced customization
Layout adjustment
Graphic work / visualizations
Custom coding
Full WordPress development and design

Services

What we can offer

  • Demo setup +

    If you'd prefer not to handle the installation yourself or need help getting started, we'll set everything up for you.

  • Layout adjustment +

    We'll help you rearrange sections, adjust spacing, and modify the page structure to fit your needs.

  • Advanced customization +

    More complex styling changes, theme option modifications, and third-party integrations.

  • Custom coding +

    If you need something that's not included in the theme, we can code it for you.

  • Graphic work / visualizations +

    Web design services to create custom sections, pages, and blocks for your theme, plus graphics and visualizations.

  • Full WordPress development and design +

    Full website builds, custom theme development, or plugin creation from scratch.

  • About pricing +

    We'll provide a clear quote based on what you need. No hidden fees.

Professional Developers At Your Fingertips!

Custom Work Form