1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How Can I Make The Navigation Sort By Alphabetical Order?

Discussion in 'CSS' started by banks1, Aug 14, 2009.

  1. #1
    Hi guys,

    On my blog, I recently noticed something, that I would like to change.

    At the top, when you hover over Finance, Internet Business, Miscellaneous, SEO, and Contests, subtopics open. For some reason, these subtopics are NOT in alphabetical order.
    SEMrush
    Does this have to do with my CSS? If so, what do I change to make these appear in alphabetical order?

    Thanks :)
     
    banks1, Aug 14, 2009 IP
    SEMrush
  2. Love*

    Love* Well-Known Member

    Messages:
    1,739
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    165
    Digital Goods:
    1
    #2
    LOL, absolutely NOT css. :p CSS only has to do with how the site looks, its colors, the font, its width etc. :)
     
    Love*, Aug 14, 2009 IP
  3. c4gamerz

    c4gamerz Well-Known Member

    Messages:
    294
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Just add order number to your post like if you want subtopic1 to appear first than enter 1 and if you want subtopic2 to apper after it than enter odrder number 2. Thats it ;)
     
    c4gamerz, Aug 15, 2009 IP
  4. banks1

    banks1 Peon

    Messages:
    1,327
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Eek. I was so sure I was wrong -- I just didn't know where to post this :p

    Sorry, I don't see how it has to do with posts though. I went to the Category section, and see no option for ordering categories.
     
    banks1, Aug 15, 2009 IP
  5. c4gamerz

    c4gamerz Well-Known Member

    Messages:
    294
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    110
    #5
    c4gamerz, Aug 15, 2009 IP
    banks1 likes this.
  6. banks1

    banks1 Peon

    Messages:
    1,327
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #6
    banks1, Aug 16, 2009 IP
  7. c4gamerz

    c4gamerz Well-Known Member

    Messages:
    294
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    110
    #7
    Your welcome!
     
    c4gamerz, Aug 17, 2009 IP
  8. banks1

    banks1 Peon

    Messages:
    1,327
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #8
    That plugin made the categories go in the order I specified, but only within my admin panel. Users visiting my blog still see them in the same order as before. Dang! I think this has to do with some .php editing.
     
    banks1, Aug 17, 2009 IP
  9. c4gamerz

    c4gamerz Well-Known Member

    Messages:
    294
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    110
    #9
    c4gamerz, Aug 17, 2009 IP
  10. Jalpari

    Jalpari Notable Member

    Messages:
    5,640
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #10
    my category plugin can also do what u want but if u want to do it manually then use this code.

    <?php
    wp_list_categories('orderby=name&include=3,5,9,16'); ?>

    include=3,5,9 means u can add category number for including in the list and if u want to exclude then same code will work but replace include with exclude.
     
    Jalpari, Aug 20, 2009 IP
  11. banks1

    banks1 Peon

    Messages:
    1,327
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Thank you! Do I include that in the header.php?
     
    banks1, Aug 20, 2009 IP
  12. sudharsan

    sudharsan Active Member

    Messages:
    164
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #12
    yes..find this <div class="categories"> </div> in header.php..

    replace the existing one with this one.

    <?php
    wp_list_categories('orderby=name&include=3,5,9,16'); ?>
     
    sudharsan, Aug 20, 2009 IP
  13. banks1

    banks1 Peon

    Messages:
    1,327
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #13
    When I replace <?php fs_list_categories(0, get_cat_ID(fs_settings('featured_name'))); ?>

    with

    <?php wp_list_categories('orderby=name&include=3,5,9,16'); ?>

    This is what happens:

    [​IMG]


    It should look like this:

    [​IMG]
     
    banks1, Aug 22, 2009 IP
  14. MYND

    MYND Active Member

    Messages:
    136
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #14
    ^

    <?php wp_list_categories('orderby=name&title_li='); ?> 
    Code (markup):
     
    MYND, Aug 22, 2009 IP
  15. banks1

    banks1 Peon

    Messages:
    1,327
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #15
    I just tried that code, and got the exact same problem. :(
     
    banks1, Aug 22, 2009 IP
  16. MYND

    MYND Active Member

    Messages:
    136
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #16
    Could you post your currently used navigation part (from header.php) that includes div and other elements around it? The code I gave you should sort out the categories alphabatically (both, parent and children) and list them without any 'heading'.
     
    MYND, Aug 22, 2009 IP
  17. banks1

    banks1 Peon

    Messages:
    1,327
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Sure!

    </div>
    <div class="categories">
    <?php fs_list_categories(0, get_cat_ID(fs_settings('featured_name'))); ?>
    </div>
    </div>
    <!-- END header -->
     
    banks1, Aug 22, 2009 IP
  18. MYND

    MYND Active Member

    Messages:
    136
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #18
    Replace that code with this:

    </div>
    <div class="categories">			
    <ul>
    <?php wp_list_categories('orderby=name&title_li='); ?>
    </ul>
    </div>
    </div>
    <!-- END header -->
    Code (markup):
     
    MYND, Aug 22, 2009 IP
    banks1 likes this.
  19. banks1

    banks1 Peon

    Messages:
    1,327
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Thanks a million. Worked perfectly. I'm sure this will help a lot of others, as I've seen many have this problem. Rep +
     
    banks1, Aug 22, 2009 IP
  20. myst_dg

    myst_dg Active Member

    Messages:
    224
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #20
    Depends on where you place your category widget, generally in sidebar, or whatever.
     
    myst_dg, Aug 22, 2009 IP