• Resolved wethead

    (@wethead)


    Hello Everyone.

    My wordpress version is 2.5.1 ( although I selected 2.3 by mistake )

    I am using the following code on a custom template to list my sub cats by cat, BUT there NOT appearing , Abc order 🙁

    Can someone etll me what I need to add to the following to have my sub cats and cats displayed in Abc order ,

    Here is the code and Thanks in advance !

    <?php wp_list_cats('sort_column=id&optioncount=0&use_desc_for_title=0&child_of=328'); ?>

    This just lists them in the order I entered them 🙁

    Abc is what I am looking for ,

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • wp_list_cats should NOT be used with WP 2.5.1.
    Read the Codex: Template_Tags#Category_tags

    Use this code (wp_list_cats has been replaced):

    <?php wp_list_categories('orderby=name&show_count=0&use_desc_for_title=0&child_of=328'); ?>

    http://codex.wordpress.org/Template_Tags/wp_list_categories

    Thread Starter wethead

    (@wethead)

    Hey Guys,

    Thanks for the fast response.

    What I am trying to do is list sub cats and main cats ,,,,

    So I just read what you guys wrote BUT I am a bit confused by the example on codex ( sorry bit slow today )

    So would I use this?

    <ul>
    <?php wp_list_categories('orderby=id&show_count=1
    &use_desc_for_title=0&child_of=8'); ?>
    </ul>

    Now that says order BY ID , what makes it order by abc

    Also how do I get it to show cats and sub cats

    Have a look at this page and you’ll see what I am trying to do but in abc order,

    You can see how its all out of order abc wise

    AND if someone could give me the EXACT code I need that would be awesome!

    Thanks in advance!

    Thread Starter wethead

    (@wethead)

    So to make it more clear what I need is this code below in ASC order and to be able to display them in asc order and show children of cat 407

    <?php wp_list_cats('sort_column=id&optioncount=0&use_desc_for_title=0&child_of=407'); ?>

    Can anyone PLEASE help me or show me actually the “right” way to code this without the list cats 🙂

    I mean the list cats works now,,,,I just want it to be right 🙂

    Thanks again!

    <?php wp_list_categories('use_desc_for_title=0&title_li=&child_of=407'); ?>

    orderby=id is what is messing you up. wp_list_categories orders by name (abc) by default.

    Is category ID 407 “local-plumbing-supplies”?

    Thread Starter wethead

    (@wethead)

    @iridiax

    Thank you so much for spending the time and helping me getthis done, It really means a lot,

    YOUR answer has solved my issue !

    Thanks bunches 🙂

    Oh and Yes, 407 is local plumbing supplies and that line worked perfect 🙂

    Also Thank you to everyone else that responded !!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How To Order By ABC :) Help needed’ is closed to new replies.