Random Words is another completely futile plugin which aims to bring entropy and randomness into your pages and even posts.
Ever got bored by comment pages with the same "Joe said", "Jim said" all page long ? Wouldn't it be funnier and more attractive if it printed something randomly from "thought", "wrote", "said" and "commented" ? Here we are.
Random Words is a WordPress Plugin allowing you to manage a number of lists with any items, and display random items from these lists. Everything is managed from within the Admin interface of your blog, in a very neat interface. It stores its data in two fields of WordPress' built-in Options table, and displays random entries at no cost (no extra SQL query used to fetch items)
Extract and upload to your blog, preserving directory structure if any.
Note: download counter here and stats on wordpress.org may differ and reflect the number of downloads before this plugin was hosted on the plugin directory
Activate it, go the options page and follow the instructions.
Use the following syntax :
- In .php documents :
<?php wp_ozh_randomwords('name_of_list') ?>
If you want the result returned but not echoed, add a second parameter with value zero :
<?php $test = wp_ozh_randomwords('name_of_list', 0) ?>
- In Posts or Pages :
I don't see any reasonable use for this in posts, but well, I had to do it :)
For example, I created a list named "you_are" with the following entries :
- a nice person
- a <em>porn star</em>
- so <em>cute</em> !
- <span style="color:purple">teh master of teh intarweb</span>
- reloading the page
- pretty. Well, sort of.
In this page I wrote :
- I see, I see ... that you are [ random: you_are ]
The result is (reload to see it change) :
I see, I see … that you are so cute !
Keep list names short and avoid funky characters, but use anything including HTML in the entries. It has to be one-liners, but you can insert a manual <br/>
A few suggestions, or examples of use (name of the list, followed by items of the list)
- trackback: trackback, pingback, chmlmlback, stuffback, sumthinback, trackpingback
- comment: wrote, said, replied, thought, commented
- emphasis: extremely, wickedly, awesomely, completely
You could also use it as a Quote of the Second script : create a list named "quotes" and add entries like :
- <em>640K ought to be enough for anybody.</em><br />»<strong>Bill Gates</strong>, 1981
- <em>A fast word about oral contraception. I asked a girl to go to bed with me, she said 'no'.<br />»<strong>Woody Allen</strong>, yesterday
Got a suggestion, a bug report, something to tell, to thank or to complain about ? Using this plugin on your blog ? Made something fun with it ? Tell me !
Want to share or tweet this page? Please use this short URL: http://ozh.in/l4