An Eclectic Mind

Web site and blog for Maria Langer, freelance writer and commercial helicopter pilot.


Random image #1Random image #2Random image #3

Random Quotes

Posted on December 7th, 2006 at 7:53 am ·
Filed in: RSS BLog Technicalities   

I add a plugin to display random “Words to Live By” on my site.

Every once in a while, I’ll hear or read a quote I think is particularly profound and want to share it with others on my site. I’d been doing this for months with the “Words of Wisdom” block near the bottom of the sidebar on the Home page. I listed three quotes there — one of which was the First Amendment to the U.S. Constitution, which is rather long. I knew that if I kept adding quotes, the block would be much larger than it should and the quotes would lose their impact.

Enter Random Quotes (or WP-Quotes), a plugin by Dustin Barnes. This plugin enables you to maintain a database of quotes within your WordPress database, using WordPress’s administrative interface to enter and edit quotes. You then place a line of code in a template file (in my case, sidebar.php) to display a random (or specific) quote.

I tweaked my Web site this morning to add this feature and I’m very happy with it. Setup went smoothly, although I did have to fiddle around a bit with the style.css file to get the quotes to look right. (My trick: assign the same style definitions to the quote styles as my sidebar list styles.) Only one quote displays at a time and I’ve set it up to display on the Home page only. You’ll find it near the bottom of the sidebar, under “Words to Live By.”

Now all I need to do is gather some more good quotes.

Print This Print This  • Read 1646 Times
Add to Del.icio.usAdd to Del.icio.us • Technorati ThisTechnorati This • Digg ThisDigg This • Stumble ItStumble it! • Twit ThisTwit This


 

 

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

If you have a Gravatar, it will appear beside your approved comment.
No Gravatar? Get one free!