Muschamp Rd

Simple Random Quotation WordPress Plugin

June 15th, 2011
WordPress Logo

One of the things I’ve been going to do for a long time is make a WordPress plugin, you know just to prove I could.  But for  the longest time I didn’t have an idea.  Then I made a whole bunch of web mashups with PHP and I decided after all that a WordPress plugin would be easy.

Rather than take on all the overhead of my mashup codebase, I decided to just make a super simple plugin that pulls a random quotation from a .csv file and displays it on screen.  The plugin is widget enabled, you just drag it to a dynamic sidebar and provide a file path and voila random quotation.

It isn’t necessarily the most clever or the optimal solution, but it wasn’t that hard to create, even though I found a lot of the WordPress plugin tutorials lacking.  It is based a little on Hello Dolly but also on one or two tutorials I found in Google.  Here are two token screen shots of how it looks in my sidebar and what the little admin screen looks like.

I wish I would have looked in my bookmarks instead of Google as this seems like a better way to do things, certainly more object oriented.


  • International2004-a

    Is this quotations plugin available for WP 3.2.1? Couldn’t see a download link for it. Thanks

  • International2004-a

    Is this quotations plugin available for WP 3.2.1? Couldn’t see a download link for it. Thanks

  • I haven’t upgraded this blog to that version of WordPress yet, but this plugin is super simple.  All it does is read a .csv file and choose a random quotation.  I don’t see why it wouldn’t work.  I don’t know if it is being used much.  It is installed in my sidebar and just works as long as it can find the text file…

  • I just upgraded to WP 3.2.1 and the plugin is still functioning fine.  Even better the conditionals in the sidebar seem to be returning the expected results.  I’ve had the biggest unexplainable problem where sidebar conditionals are not returning expected values.  I wanted to have smaller sidebars in some cases, I think it was some advice I read by Joost somewhere. Maybe I’ll try is SEO plugin now finally, but first I’m going to update some other plugins and fix my sidebar once and for all!

    Of course I fixed it once and for all before and WordPress and/or plugin upgrades busted it…

  • All is not well is_tag is returning not true for my tag archives, it returns is_date and is_archive.  I’ve worked on a lot of content management systems and I don’t know how this can be this fubar’ed for this long.  It probably has to do with the fact I’ve had this WordPress blog since 2005 and that many upgrades has left my database slightly less than optimal, but still this has been a known issue for many updates and still it isn’t fixed completely.

  • is_single isn’t working either, it is saying those pages are is_home or is_frontpage!

  • I can’t find this plugin in the plugin directory now?  Why would they delete it, there are other random quotation plugins but not mine, WordPress.org also reset my password…  It’s stuff like this that doesn’t inspire me to write more open source code especially PHP, I don’t even like PHP!

  • Pingback: Quotation Collection Mashup – Muskblog()

  • WordPress wants me to test this plugin and certify it works with the latest version of WordPress. But I don’t have a lot of time for my blog anymore. Today I’ve spent a couple hour ‘improving’ things but I haven’t actually created any new content…

Posts on Muskblog © Andrew "Muskie" McKay comments not necessarily so...
CFA Institute does not endorse, promote or warrant the accuracy or quality of Muskblog. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.