(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.
- Install Estimated Reading Time plugin. Use “Plugins >> Add New” from the administrative panel.
- 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>'; }
- 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?
Would you like more? Send me a letter...

{ 2 comments }
Thank you so much for sharing this! Being a PHP novice, I found myself at a complete loss on how to integrate CSS styling with the output. Now I’ve learned something new…many thanks again!
Claudia, this is pretty close to a perfect first php/css project for an aspiring do-it-yourselfer.
Let me know how it turns out.
Dr Wordpress!´s last blog ..How Moderating Comments On Your Blog Destroys Conversation
Comments on this entry are closed.
{ 1 trackback }