RandomText
RandomText is a handy WordPress plugin that allows you to save, edit and delete categorized text, and inject random/rotated text by category into the sidebar (via widget) or page body (via template tags). The sidebar widget allows you to set an optional Header, and text header and footer. You could say RandomText picks up where the Text gadget left off.
Whether you want to display random/rotated trivia, quotes, helpful hints, featured articles, or snippets of html, you can do it all easily with RandomText.
The WordPress Plugin page is here: http://wordpress.org/extend/plugins/randomtext/
Installation
- Upload `randomtext.php` and `randomtext_admin.php` to the `/wp-content/plugins/` directory of your WordPress installation
- Activate the plugin through the ‘Plugins’ menu in WordPress
- The Random Text widget can now be configured and used from the Appearance -> Widgets menu
- Text entries can be managed via from the Settings -> Random Text menu
Note: During installation, Random Text creates a new database table to store the entries by category – you should see two test records after installation by clicking on the Settings -> Random Text menu.
IMPORTANT: This plugin uses the WP_Widget class introduced in WordPress v2.8 and will not work with earlier versions of WordPress.
Release History
2011-11-03 v0.2.9 – Fixed pagination issues on admin page (again).
2011-06-15 v0.2.8 – Fixed pagination issues on admin page
2011-06-05 v0.2.7 – Fixed numerous issues highlighted by debugging mode.
2010-08-05 v0.2.6 – Fixed shortcode recursion
2010-08-04 v0.2.5 – Added support for shortcodes in text field, Fixed Admin unicode truncation issue
2009-10-26 v0.2.4 – Added shortcode support
2009-09-22 v0.2.3 – Improved handling of “No Category” items, Added Bulk Insert option
2009-08-23 v0.2.2 – Added record id check before timestamp update
2009-08-22 v0.2.1 – Added database table check/error to admin page
2009-08-22 v0.2.0 – Added random/rotation option
2009-08-19 v0.1.4 – Fixed admin path bug
2009-08-18 v0.1.3 – Fixed Pre-text/Post-text bug
2009-08-16 v0.1.2 – Fixed editing issues
2009-08-11 v0.1.1 – minor corrections to readme.txt
2009-08-10 v0.1.0 – initial release
Hi, thank you for this great plugin! I was wondering about one thing: how can I justify the text in the widget? What code do I have to put where? Thank you for your answer!
Bye Jelle
Thanks for writing the plugin. It works great and does what I was looking for.
It would be nice to have a parameter to select the number of text items to be displayed. Any chance that could be included in a future release?
Thanks — Dave
I love this script, thanks so much for this. I built a flipper on mine to kick through the different categories. See the testimonials boxes. http://gutcheckit.com/
Greetings,
Nice little plugin, this is. I can think of an addition to this that would extend its functionality. Right now you can have a random entry and one that rotates every time the page the plugin sits on is loaded.
It would be handy to have a daily, weekly or monthly option too. Perhaps you could check the datestamp in the last snippet displayed (youngest) to see if it is within a day/week/month of the current day, and if it is, take the oldest, display it and update its datestamp. Otherwise you just display the youngest again.
I’m not a programmer by nature, but I think this could work.
thanks for the plugin! I need to know what template tags to use in order to embed the random text into the php code page. please advise.
Please help me. (My english not work)
I want to display all text in Category (Random text management)
What is command (shortcode)
thank you very much to much so much
Did you ever get sent the short code for this plugin.
if you did I would appreciate if you could sent to me.
Regards,
Johnny B
What is the php function code so I can insert this into a template?
I found the shortcode in the readme file, but I would also like to know what the template tag is…
Thanks!
you should be able to use something like this, where category is the group you wish to select from.
< ?php randomtext('category'); ?>
Hi Greg,
What a great plugin. Very handy. One problem however. If you create more than 20 records, only 20 are shown on the random text page. So if you want to text in one of the invisible records, or delete one, it’s a problem. Is there a way to show and/or edit them all?
Thanks!
For some reason, pagination is not available when I try to edit the snippets of randomtext. The page tells me “Displaying 1-20 of 37″ but gives me no way to get beyond the first 20 items. Looking at your code, I figured out that I can get to the next page by adding ‘&paged=2′ to the admin URL, but I won’t remember that the next time I need to make a change.
I am using Atahualpa 3.5.3 (I know there is a much later version, but I haven’t had time to get it to work). Is this possibly a collision between the theme and the plugin?
TIA.
I’ve just released version 0.2.8 which should address the admin pagination problems.
Thanks! That fixed it.
Hi,
Great plugin. I have 10 text entries but it only ever cycles through 4 of them…is anyone else experiencing the same issue??
Cheers,
Sam
Thanks for fixing the pagination!
Great plugin! One big question: Is it possible to make the plugin working for the role of editors instead only for Administrator? Thnx!!
How do I put in a line break? ?
Thanks for a great plug-in.
http://a4jp.com
Is there a way to use HTML code instead of text? That would allow me to put in a word break and add color.
http://a4jp.com
Thanks for the excellent plugin, unfortunately I have a problem that is caused by the fact that I am using a cache plugin to speed up my site. When this plugin is active, the random text is cached and therefore no longer rotates.
Do you know how I can prevent the W3 Total Cache plugin from caching the randomtext tag in my template?
To prevent the W3 Total Cache plugin from caching the randomtext tag you will have to do two things:
- You will have to add ‘randomtext’ to the ‘Ignored query stems’ field on the Database Cache settings page of the plugin (without the quotes).
- Wrap the randomtext function in the template file with the mfunc tag (remove the spaces before the questionmarks:
I hope this helps.
Because it seems the mfunc tag is filtered out by the WordPress comments system, here is a link to the code on pastebin: http://pastebin.com/Pq2Hsj5x
Thanks for a great plugin. Can you explain a little more about how to wrap the randomtext function in the template file for use with W3 Total Cache? It’s not making sense to me what needs to be done. Thanks
I am using the WPML plugin to run my multilingual English and Dutch website. Is the Random Text Plugin compatible with the WPML string translation module, such that I can create Dutch translations that show on Dutch webpages, and English translations that show on English pages? Thanks for you help. Your plugin looks great, so I hope I will be able to use it.
I just loveyour plug in! However, I want to display the randomly chosen for one day and will display another random quote the following day. Is it possible? Thanks!
To prevent the W3 Total Cache plugin from caching the randomtext tag you will have to do two things:
- You will have to add ‘randomtext’ to the ‘Ignored query stems’ field on the Database Cache settings page of the plugin (without the quotes).
- Wrap the randomtext function in the template file with the mfunc tag (remove the spaces before the questionmarks:
+1
Did you create a short code for this plugin.
if you did I would appreciate if you could send it to me or update this page with how to use it.
I would like to use the plugin in the maim body of my pages.
Regards,
Johnny B
Shortcodes and Template tags are documented here: http://wordpress.org/extend/plugins/randomtext/faq/
This is great. I’ve got one on my blog, but I wonder if I can have two? I want another set of quotes in a different category in its own random text widget. Is there a way to do that?
Great Plugin…I would like to know if there’s a way I can do the following:
Is there an easy way to have the text rotate every 5 seconds or so….rather than on page reload.