Create a list of quotes to be displayed in random order or a specific quote one at time using custom template tags or shortcodes. Now the quotes can be listed on a page or post using a shortcode.
The list starts at 1 not 0.
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.
Yes, use [rdqr_randomquote] in a page or post.
Yes, use [rdqr_targetquote singlequote=”3″] to display the third quote. Change the number 3 to the quote that you want displayed.
Yes, use [rdqrallqts] in a page or post.
Yes, to display a random quote place in your theme template. Display a specific quote by placing in your theme template. Change the number 3 to the quote that you want displayed.
Yes, the shortcodes can be used in widgets.
1.0.4
- added screenshots
- added shortcode to list all quotes on a page or post
- made general text updates thru the readme file
- updated wp version
1.0.3
- updated images
- updated wp version
1.0.2
- added shortcodes
1.0.1
- made within the functions.php file of the theme
1.0.0
- created plugin, cleaned things up
- Upload the plugin files to the
/wp-content/plugins/randomquotr
directory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the ‘Plugins’ page in WordPress
- Use the Settings->RandomQuotr page add quotes in the textarea on the left-hand side. Each quote needs to be on a new line. They are split with carriage returns (line breaks).
- Use the following hooks to display the quotes:
Get a random quote
* rdqr_random_quote();
– this will display the text automatically.
* $quote = rdqr_get_random_quote();
– this stores the text within a variable.
Getting a specific quote
* rdqr_target_quote(3);
– this will display the third quote in the list.
* $quote = rdqr_get_target_quote();
– this stores the text within a variable.
Reviews
0 out of 5 stars
- Version: 1.0.4
- Last updated: 5 months ago
- Active installations: 10
- WordPress version: 4.0
- Tested up to: 6.5.5
- PHP version: 7.1