WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_list_cats sort order problem (8 posts)

  1. gerenm
    Member
    Posted 9 years ago #

    I'm running WP 1.5, and using a modified version of the "Stucco" theme. As published, this them sorts categories by ID. I'd like them sorted by category name. I modified the category listing function to read <?php wp_list_cats('sort_column=name&sort_order=asc&children=1'); ?>, however, the categories are still sorted by ID. Any thoughts?

    Thanks in advance.

    -Geren

  2. ColdForged
    Member
    Posted 9 years ago #

    Unfortunately, that's precisely how I do my archives listing and it sorts fine for me. I guess make sure you're modifying the right file, that's the only thing I can think of.

  3. rankbeginner
    Member
    Posted 9 years ago #

    Here's the code that sorts my categories alphabetically:

    '
    <h2><?php _e('Categories'); ?></h2>

      <?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>

    '

    The result is at http://www.youthtopia.com

    Hope that Helps,

    RB

  4. Chip Bennett
    Theme Review Admin
    Posted 9 years ago #

    I have exactly the same problem. I've tried list_cats and wp_list_cats, and get the same result. Nothing seems to work to display by 'name'... I'm stymied.

  5. Lee Penney
    Member
    Posted 9 years ago #

    Turned out to be me not upgrading my files properly.

  6. gerenm
    Member
    Posted 9 years ago #

    The upgrade to 1.5.1.3 solved the problem -- a long time ago. Sorry for not "closing" this one.

  7. www.onlinecasinoselite.com
    Member
    Posted 9 years ago #

    I have version 1.5, and just for this one thing I'd rather not go through the whole upgrade. Can someone point me to the place in the code where I can fix this in my 1.5 installation?

  8. www.onlinecasinoselite.com
    Member
    Posted 9 years ago #

    Is there some sort of caching going on? I changed the SQL in two places in the template-functions-category.php file, but the sort order still won't change from by ID.

Topic Closed

This topic has been closed to new replies.

About this Topic