WordPress.org

Ready to get started?Download WordPress

Forums

How to have recent Post for each category? (2 posts)

  1. Megagents
    Member
    Posted 6 years ago #

    Search results

    This person was never helped.
    http://wordpress.org/support/topic/113853

    Don't understand this one.
    http://wordpress.org/support/topic/113284?replies=7

    This person was also never helped.
    http://wordpress.org/support/topic/151344?replies=1

    The plugin that was linked to was not found.
    http://wordpress.org/support/topic/130372?replies=6

    The Loop didn't work for me.
    http://wordpress.org/support/topic/145137?replies=2

    WordPress hasn't made a widget or something for this yet? Does anyone know a reliable solution to this?

  2. bulletproof
    Member
    Posted 6 years ago #

    '<?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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.