Wordpress PHP question

Discussion in 'PHP' started by GrassR00ts, Apr 17, 2008.

  1. #1
    Hello All

    I have a query on one of my wordpress pages that look like this

    <?php $recent = new WP_Query("cat=9&showposts=3"); while($recent->have_posts()) : $recent->the_post();?>
    <li><a href="<?php the_permalink(); ?>"><strong>
          <?php the_title(); ?>
        </strong></a> 
    	</li>
        <?php endwhile; ?>
    PHP:
    I want to have it pull random posts from category number 9 and show 3 posts. As it is now it shows the most recent posts. What would I need to change to make it show random posts?

    Thanks
    Alex
     
    GrassR00ts, Apr 17, 2008 IP
  2. evilgreenmonkey

    evilgreenmonkey Peon

    Messages:
    26
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    evilgreenmonkey, Apr 18, 2008 IP