This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

RandomQuotr

Description

Allows the user to create a list of quotes, and then pull either a random or specific quote from that list using custom template tags.

Current version

Current version: 1.0

Revision History

0.1 – made within the functions.php file of the theme
1.0 – created plugin, cleaned things up

GPL

Copyright 2008 Corey Dutson (email : cdutson@wallofscribbles.com)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Installation

  1. Upload RandomQuotr to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Under the settings section, navigate to the RandomQuotr section
  4. Add quotes to the textarea on the left-hand side. Quotes are split by carriage returns (line breaks)

Once that’s done, you can use the following hooks to display the content:

Getting a random quote
* random_quote(); – this will display the text automatically.
* $quote = get_random_quote(); – this stores the text within a variable.

Getting a specific quote
* target_quote(3); – this will display the third quote in the list.
* $quote = get_target_quote(); – this stores the text within a variable.

FAQ

I’m using target_quote(0) and nothing’s coming up! I know I have a quote in there though

The list starts at 1, not 0.

target_quote and get_target_quote are not doing anything!

Make sure that you are passing in a valid value. If you are passing in an invalid number (below 1, above the number of quotes), a non-number (“forty”), or there are no quotes to get, all of the functions will return null.

Contributors & Developers

“RandomQuotr” is open source software. The following people have contributed to this plugin.