WordPress.org

Ready to get started?Download WordPress

Forums

Sort Category (3 posts)

  1. johncizmar
    Member
    Posted 7 years ago #

    Is there a way to sort out archives by category page. I'm sorting the posts into different category pages. The problem I'm facing is that I want to display archives of each category on their page.

    Thanks

  2. djr3110
    Member
    Posted 6 years ago #

    Hi not sure if this applies to what you are asking but - I've been looking ofr a simple way of sorting the categories by id rather than name.

    And I've found a way - not great because it edits the core files but it's only a little change.
    if you open wp-includes/widgets.php and find line 623 you can change the line
    $cat_args = "orderby=name&show_count={$c}&hierarchical={$h}";

    so that it reads -
    $cat_args = "orderby=id&show_count={$c}&hierarchical={$h}";

    And then it will sort the categories by id instead of name

  3. djr3110
    Member
    Posted 6 years ago #

    Ok this works of sorts - but does anyone have a simple way of putting parent categories in one order and child categories in another??? It's just about one of the most frustrating aspects of wordpress.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags