Forums

Custom Posts and Taxonomy Terms (3 posts)

  1. nospario
    Member
    Posted 4 months ago #

    Hi,

    This is what I would like to be able to do, can someone let me know if it is possible and if possible ideas on how to do it.

    I would like to create an un-ordered list, like below, which shows hierarchical terms and custom post titles which are associated with the terms.

    • Term 1
      • Term 2
        • Custom Post Title
        • Custom Post Title
        • Custom Post Title

      etc etc...

      I know how to create the custom posts, taxonomies and terms, it's being able to query them to get the layout that I want I'm struggling with.

      Any ideas anyone?

      Many thanks.

  2. vtxyzzy
    Member
    Posted 4 months ago #

    The article below gives sample code for listing post titles by category:

    http://wordpress.mcdspot.com/2012/01/22/post-titles-by-category/

    I think you can get what you want by changing the 'category' argument to get_terms(), and adding a post_type argument to the WP_Query().

  3. nospario
    Member
    Posted 4 months ago #

    This looks promising! Thanks, I'll take a proper look later on and report back.

Reply

You must log in to post.

About this Topic