| 开发者 |
Corey Dutson
jfcby |
|---|---|
| 更新时间 | 2024年4月19日 18:55 |
| PHP版本: | 7.1 及以上 |
| WordPress版本: | 6.5.2 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/wp-content/plugins/randomquotr directory, or install the plugin through the WordPress plugins screen directly.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.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 <?php echo do_shortcode("[rdqr_randomquote]"); ?> in your theme template. Display a specific quote by placing <?php echo do_shortcode('[rdqr_targetquote singlequote="3"]'); ?> in your theme template. Change the number 3 to the quote that you want displayed.
Yes, the shortcodes can be used in widgets.