Sort Category (3 posts)

  1. johncizmar
    Posted 9 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.


  2. djr3110
    Posted 8 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
    Posted 8 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