You are here: Home » Extending WordPress » How To Customize Estimated Reading Time Plugin for WordPress

How To Customize Estimated Reading Time Plugin for WordPress

by Dr Wordpress! on June 24, 2009 · 0 comments

(Reading time: 1 – 2 minutes)

Ben grabbed a coupon to force me to expose my secrets for the “estimated reading time” that leads off each post. I wasn’t going to tell anyone how I did this because it’s so easy, really, it’s a snap. I’m going to show you how to do this in 3 easy steps.

  1. Install Estimated Reading Time plugin. Use “Plugins >> Add New” from the administrative panel.
  2. Modify plugin. Go to the plugin editor and open up estreadtime.php. It looks like this:
    36
    37
    38
    39
    40
    41
    42
    43
    
    else
        $output = sprintf(__("Reading time: %s - %s minutes"), $minutes_fast, $minutes_slow);
     
        if ($return)
           return $output;
        else
           echo $output;
    }

    You want to change lines 40 and 42 so that they look like this:

    39
    40
    41
    42
    43
    
    if ($return)
       return '<p class="estread">' . $output . '</p>';
    else
       echo '<p class="estread">' . $output . '</p>';
    }
  3. Modify CSS. Here’s how mine looks:
    p.estread {
       padding-bottom: 1em;
       font-size: 65%;
       font-weight: bold;
    }

That’s all there is too it!

Or is it…

I’ve done something else pretty sneaky to get exactly the layout I want. Can you guess what it is?

Similar Posts:

Share and Enjoy:
  • Facebook
  • Twitter
  • StumbleUpon
  • Digg
  • Google Bookmarks
  • email
  • del.icio.us

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

CommentLuv Enabled

Previous post: Thesis Theme For WordPress: pros and cons

Next post: How To Easily Create Permalinks With Post Slugs That Help Your Blog SEO