WordPress.org

Ready to get started?Download WordPress

Forums

Showing 5 latest posts from a category. (2 posts)

  1. j03
    Member
    Posted 5 years ago #

    Hey,

    I was looking for a plugin and or something that allowed me to grab the latest 5 entries from one category and include a 10 or so word description of the post. At the end of the 10 words it would show a link to read the full entry.
    So an example of what it would show is: New Tea Selections - Orange Pekoke with a hint of Lemon is now available... Read More

    Another thing if I go to ?cat=3 for the news category only 1 item shows. Is this just a setting I have to configure?

    Preferably I would not like to give out the website for this but if someone can help me and it is vital to see it I can send the link privately.

    Any help would be greatly appreciated. J03.

  2. phrozen755
    Member
    Posted 5 years ago #

    I'd use something like this:

    <?php
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("cat=3&paged=$page&posts_per_page=5"); ?>

    and slap that into a theme, with building the rest of the php, like maybe an excerpt, etc.

    Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Topic