get_posts ランダムらんだむ

Random posts

WordPress Codexより

Display a list of 5 posts selected randomly by using the MySQL RAND() function for the orderby parameter value:

[php]
<ul>
<?php
$args = array( ‘numberposts’ => 5, ‘orderby’ => ‘rand’ );
$rand_posts = get_posts( $args );
foreach( $rand_posts as $post ) : ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>[/php]

orderdby => ‘rand’ ね。すぐ忘れるんだよね〜(;゚ロ゚)