Support » Plugin: Custom Post Type UI » How to list custom posts alphabetically by type and by tax

  • Resolved sayner


    Hi there, I’m after a solution. I have multiple custom post types and I need to be able to list my custom posts alphabetically by title and by taxonomy.

    I’ve got the taxonomies set up to act like categories – I just need them to render as an unordered list of links like this:

    Category 1
    – Post Aa
    – Post Ab
    – Post Ac

    Category 2
    – Post Aa
    – Post Ab get the idea.

    Is there a way to do this quite simply?

Viewing 1 replies (of 1 total)
  • Plugin Author Michael Beckwith


    Technically outside the scope of the plugin, it simply does the registering for you, but I’ll throw in some ideas regardless.

    I think I’d end up with a multi-layered loop in this case. The outer most loop would be querying for each desired category. Category 1 and Category 2 for example. Inside that loop would be a second query that pulls all of the posts for the current iterated category. Then loop through that query result and orderby title.

    Hopefully that makes some sense, or someone stops by with a better idea 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘How to list custom posts alphabetically by type and by tax’ is closed to new replies.