WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to alphabetize categories? (6 posts)

  1. Temerity
    Member
    Posted 7 years ago #

    My site is at http://reviews.luffy-pirates.com/

    I would like to have some things in the right-hand bar alphabetized (links, categories, pages). I’d like to leave the Archive as it is, and leave the Meta as it is too.

    Now, I basically know how to get my categories organized, with this code:

    <?php wp_list_cats('sort_column=name&sort_order=asc'); ?>

    But when I use that, it messes up the indentation on my site. (and I lose the custom bullet graphics) I’d like to find a way that I can keep the style of my side-bar looking the same, but still organize categories in alphabetical order, along with their sub-categories. Can this be done with my current template? Any help would be greatly appreciated since I’m rather new to all this.

  2. basketball
    Member
    Posted 7 years ago #

    This should do it
    <?php wp_list_cats('sort_column=name&optioncount=0&hierarchical=1'); ?>

  3. Temerity
    Member
    Posted 7 years ago #

    Thank you so much! I've spent a couple hours trying to find an answer in previous posts, with no such luck. It looks like it's working great now though.

  4. basketball
    Member
    Posted 7 years ago #

    No problem :-)
    Glad you got it working

  5. ticogrande
    Member
    Posted 7 years ago #

    Mr. (or Ms) Basketball... Thanks! Perfect!

    Been trying to get the categories in my blogs set up in alphabetical order... and you made my life simple. I just gotta learn more PHP.

    Thanks

    Tim
    http://www.hisfault.com
    http://blog.therealcostarica.com

  6. bryanh30
    Member
    Posted 6 years ago #

    Can someone please tell me where exactly that this script goes? thanks...

Topic Closed

This topic has been closed to new replies.

About this Topic