Ready to get started?Download WordPress


can anyone tell me how to alphabetize link categories? (3 posts)

  1. squalor
    Posted 7 years ago #

    and if so, what in all this:

    <h3><?php _e('blogroll','bnOutThere'); ?></h3>
    <?php $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
    foreach ($link_cats as $link_cat) {
    <h4 id="linkcat-<?php echo $link_cat->cat_id; ?>"><?php echo $link_cat->cat_name; ?></h4>
    <?php wp_get_links($link_cat->cat_id); ?>
    <?php } ?>

    does a girl change to get them to sort by name and not ID? every time I try I get syntax errors....I'm floundering here. hoo boy.

    thank you!

  2. pizdin_dim
    Posted 7 years ago #

    Add "ORDER BY cat_name" after "FROM $wpdb->linkcategories". Oh, and read this soon.

  3. squalor
    Posted 7 years ago #

    pizdin_dim, you got a weird name; and I love ya. Thank you so much! gros bisous....

Topic Closed

This topic has been closed to new replies.

About this Topic