WordPress.org

Ready to get started?Download WordPress

Forums

list child category latest post titles! (2 posts)

  1. rstarr
    Member
    Posted 7 years ago #

    I have a nav bar that I would like to list the titles of the latest posts in the 3 child categories of one parent category.

    Basically i have one category Portfolio. The 3 child categories are Portfolio1, Portfolio2, and Portfolio3.

    I would like to list the following:
    title one of the latest post in Portfolio1, title one of the latest post in Portfolio2, title one of the latest post in Portfolio3

    Right now all i can figure out is how to list the titles of the 3 child categories:
    <?php wp_list_cats('sort_column=id&optioncount=0&use_desc_for_title=0&child_of=4'); ?>

    Anyone know how to do this?

    Thanks!

  2. Michael Bishop

    Posted 7 years ago #

    Template_Tags/get_posts

    Might be a way of doing this, but keep in mind, when you star t running multiple loops, weird things can happen.

    You may need to read through this as well
    The_Loop#Multiple_Loops

Topic Closed

This topic has been closed to new replies.

About this Topic