Support » Fixing WordPress » How to have recent Post for each category?

Viewing 1 replies (of 1 total)
  • ‘<?php
    $postslist = get_posts(‘numberposts=10&order=ASC&orderby=post_title&category=1‘);
    foreach ($postslist as $post) :
    setup_postdata($post);
    ?>
    <div>
    <?php the_date(); ?>

    <?php the_title(); ?>
    <?php the_excerpt(); ?>
    </div>
    <?php endforeach; ?>’

    where bold add the category number you want to show.

Viewing 1 replies (of 1 total)
  • The topic ‘How to have recent Post for each category?’ is closed to new replies.