ciao a tutti! è un bel po' che non scrivo ma avrei bisogno di un aiuto:
sto cercando di customizzare al meglio un tema wordpress sul mio sito, nella sidebar attuale mi mette le ultime 3 immagini (o meglio seconda terza e quarta) dei post inseriti, fin qui tutto ok ma vorrei che fossero non in ordine e soprattutto random, che pescasse cioe' 3 post in modo casuale..
la pagina si chiama sidebar-featured.php mentre il codice è questo:
<?php
wp_reset_query();
query_posts("showposts=3&offset=1");
if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<li class="article">
<?php
if ( has_post_thumbnail() ) { ?>
<?php
$imgsrcparam = array(
'alt' => trim(strip_tags( $post->post_excerpt )),
'title' => trim(strip_tags( $post->post_title )),
);
$thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?>
<?php echo "$thumbID"; ?>
<div class="article-over">
<h2>"><?php the_title(); ?></h2>
<?php the_excerpt(); ?>
<div class="postmetadata">
Posted: <?php the_time(__('F jS, Y', 'kubrick')) ?>ˑ
<?php comments_popup_link(__('No Comments'), __('1 Comment'), __('% Comments'), '', __('Comments Closed') ); ?>
<?php printf(__('Filled under: %s'), get_the_category_list(', ')); ?>
</div>
</div>
qualcuno potrebbe indicarmi come fare? grazie mille!