• Hi,.
    I have problem in post order by date on this trick.
    I try some codes i have found here :

    <?php $mycats = array(28,30,31,102); // the category ID numbers
    foreach ($mycats as $catid) :
    query_posts(array('cat'=>$catid,'showposts'=>1));
    while (have_posts()): the_post();
    ?>
    //Do stuff
    <?php endwhile; ?><?php endforeach; ?>

    This way will pull 1 post for each category. First Category in array will show on the top of the page.

    But i have other idea to make its show ordered by date. The recent post could be show on the top. So, its will make the category box rotate dynamically depend on the updated post.

    Is it possible? I have try several looping tricks to do this.

    Thank You for all your idea.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘1 recent post in each category box on the home.php’ is closed to new replies.