Hello all,
I have the fallowing php code:
$my_query = new WP_Query('category_name=Citat&showposts=1&orderby=rand'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php echo get_post_meta( get_the_ID(), 'citat', true ); ?></a><br/>
<div class="autor_citat"><?php echo get_post_meta( get_the_ID(), 'autor', true ); ?></div>
<?php endwhile;
How can I add a function that display only the displays post from current week?
I have tried this: http://codex.wordpress.org/Template_Tags/query_posts#Time_Parameters but with no luck, it display tree posts instead of one.