post sorting in slide
-
I have code:
<?php<br /> $slidecatID = get_cat_id(get_option('scar_gldcat'));<br /> $slidecount = get_option('scar_gldct');</p> <p>$my_query = new WP_Query('cat=5'. $slidecatID . '&showposts=6' . $slidecount . '$orderby=ran');<br /> while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID;<br /> ?>I want to sort post that will be showing from category ID=5
I use to do that this ==> ‘cat=5’
There will be 6 post,
I use to do that this ==> ‘&showposts=6’
everything to this point is workingBut I want show only recent post, not random.
want to change this one ==> ‘$orderby=ran’
I want sort the post by date, that the last
6 post from category id 5 will be visible on each
page where the slide is included.
Anyone know how to do it ?? Really need a help . . .
The topic ‘post sorting in slide’ is closed to new replies.