WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. sayner
    Member
    Posted 1 year 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?

    http://wordpress.org/extend/plugins/custom-post-type-ui/

  2. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year 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

About this Topic

Tags

No tags yet.