开发者 |
scarpenter
ChristianB franky999 |
---|---|
更新时间 | 2011年1月8日 22:17 |
捐献地址: | 去捐款 |
PHP版本: | 2.5 及以上 |
WordPress版本: | 3.0.1 |
yarq_display_all
function:
yarq_display_all($order_by = 'id', $asc = true, $format = '')
Which displays all quotes in a list. The first parameter takes id, author, source, or quote. The second is for ascending or descending order, and the third lets you override the format specified in admin options.
You might call from your theme/template file like so, supplying the <ul>
or <ol>
wrapping tags yourself:
<?php if ( function_exists('yarq_display_all') ) { echo '<h2>All Quotes</h2>'; echo "<ul>\n"; yarq_display_all('id', false); echo "</ul>\n"; }
Which can be styled as desired. Alternating <li>
items, starting with the first, will use the class "yarq-alt". (<li class="yarq-alt">
)
Much more at: http://www.movingtofreedom.org/2010/07/11/wordpress-plugin-yarq-v3-yet-another-random-quote/
yarq.php
to the /wp-content/plugins/
directory<?php yarq_display(); ?>
in your templateyarq_display_all()
can be used to display all quotes in a list. (See description tab for options and examples.)<li>
tag is found in the quote.