WordPress.org

Ready to get started?Download WordPress

Forums

How to Sort Categories By Alphabet??? (6 posts)

  1. bizmord
    Member
    Posted 8 years ago #

    My current theme .... http://www.bizmord.com/Blog sorts Categories not by alphabet. How do I make it sort only by Alphabet?

    Thank you.

  2. ebusiness
    Member
    Posted 8 years ago #

  3. bizmord
    Member
    Posted 8 years ago #

    what is the exact code and where do I place it?

  4. moshu
    Member
    Posted 8 years ago #

    bizmord,
    why don't you stick to your own thread instead of asking the same question all around?
    And read the resources given to you before bumping old threads!

  5. eiht
    Member
    Posted 7 years ago #

    Hi Guys.

    Since I'm new to WP I'd like to ask you where do I have to put the code that is mentioned in http://codex.wordpress.org/Template_Tags/list_cats#Sorted_by_Category_Name

  6. converting2wp
    Member
    Posted 7 years ago #

    Apologies if this is too step-by-step, but it wasn't that long ago that I needed this level of detail.

    When logged in as an admin, your main menu will be # Dashboard Write Manage Links Presentation ...
    Click Presentation

    In the Presentation submenu, you'll see an item "Theme Editor". Click that.

    Now you can click the file names down the left hand side and edit those files in the text area.

    The one you want is probably called Sidebar, sidebar.php or something similar.

    Somewhere in that file, there is a call to list_cats (or wp_list_cats). Both are PHP functions. list_cats takes positional parameters. wp_list_cats allows you to specify the parameters with a name/value notation.

    You'll find wp_list_cats documented at
    http://codex.wordpress.org/Template_Tags/wp_list_cats

    Now if you understand the notion of a function with parameters, you can go from the documentation to create a function call tailored to your specific needs.

    Make the change and click "update file" and you're done.

    You don't need to know much, if anything, about the PHP language to use the WordPress template tags as a very powerful site configuration tool. It may seem odd to get this nitty gritty to do what seems like a simple configuration, but once you're comfortable with the system, I hope you'll find the power worth the complexity.

Topic Closed

This topic has been closed to new replies.

About this Topic