WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Sort by child category id (4 posts)

  1. Storyman
    Member
    Posted 6 years ago #

    This is the code to display the child category for category #8. It list only the child titles and sort by title.

    I'd like to sort by child category id. What I realized after changing 'name' to 'id' is that is sorting by parent category id--not child id. Adding 'sort_column=id' before or after 'child_of=8' does not work.

    wp_list_categories ('sort_column=id&title_li=&child_of=8');

    How can I get the list to sort by child id?

  2. Storyman
    Member
    Posted 6 years ago #

    bump :)

  3. thepete
    Member
    Posted 6 years ago #

    That's funny, this is labeled "resolved" but it doesn't appear to be.

  4. MichaelH
    Member
    Posted 6 years ago #

    thepete-are you asking how to sort the categories by ID?

    If so consider using the orderby=ID parameter with the template tag, wp_list_categories().

Topic Closed

This topic has been closed to new replies.

About this Topic