WordPress.org

Ready to get started?Download WordPress

Forums

Category Archive Page (2 posts)

  1. ddeuster
    Member
    Posted 1 year ago #

    I'm looking to do a page that contains CPT's for Recipes. I've created different categories for the recipes and would like to be able to generate a row for each category we add with the three most recent posts from that particular category with a link to the full listing of the individual categories. Blow is the layout I'm looking to achieve.

    Category Layout

  2. edpittol
    Member
    Posted 1 year ago #

    With the function get_terms tou take all terms of a taxomy in a array. In your case the categories of recipes.

    http://codex.wordpress.org/Function_Reference/get_terms

    After this, you can iterate over this array and take the last posts with the WP_Query object.

    http://codex.wordpress.org/Class_Reference/WP_Query

Topic Closed

This topic has been closed to new replies.

About this Topic