miércoles, 1 de abril de 2009

Mostrar una lista de artículos aleatorios


Este código muestra una lista de 10 artículos aleatorios:

<h3>Artículos Aleatorios</h3>
<ul>
<?php
query_posts(array('orderby' => 'rand', 'showposts' => 10));
if (have_posts()) :
while (have_posts()) : the_post();
?>
<li><a href="<?php echo the_permalink(); ?>" title="Enlace Permanente a <?php echo the_title() ?>"><?php echo the_title() ?></a></li>
<?php endwhile;
endif; ?>
</ul>