• Hello. I’m trying to find out what is going wrong when I try to order categories by name. This is the code in the presentation:

    <?php list_cats(1, 'All', 'name', 'asc', '', 1, 0, 1, 1, 1); ?> – it came with the style I downloaded, actually. The result that produces is :

    Site News (1)
    American Politics (57)
    Movies (44)
    Music (51)
    Fcked World (51)
    Sports (37)
    Technology (53)
    TV (40)
    World News (45)
    Opinions / Rants (1)
    Canadian Politics (8)

    Not quite in order. I checked with the Codex and sort asc by name is what I want, right?

    Thanks for any help.

Viewing 4 replies - 16 through 19 (of 19 total)
  • melyviz –

    You’ll want to use ‘sort_column=name’ as well, if you want to sort by name. WP will sort by ID by default.

    That one worked like a charm. Thanks Kafkaesqui!

    josquin: fine now, thank you.

    I have a similar question. I would like to order my posts NOT based on dates or names, but based on my own numbering.

    I thought of adding a custom field called “Ranking”, but can I do this at a category level instead of post level?

    So I need to customize as follows:

    1. Add a custom field to the description of the categories called ranking, and be able to rank categories as 1, 2, 3.

    2. Add a custom field to the fields in each category, so that I can rank posts in each category as 1,2,3.

    Would appreciate some thoughts.

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Ordering categories’ is closed to new replies.