Custom Post Type UI
[resolved] How to list custom posts alphabetically by type and by tax (2 posts)

  1. sayner
    Posted 3 years ago #

    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

    ..you get the idea.

    Is there a way to do this quite simply?


  2. Michael Beckwith
    Plugin Author

    Posted 3 years ago #

    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 :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Type UI
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.