WordPress.org

Ready to get started?Download WordPress

Forums

How to list categories and description on page? (4 posts)

  1. westondeboer
    Member
    Posted 6 years ago #

    after i upgraded to 2.3 i am having a hard time figuring out how to list the categories and there descriptions. Can anyone help me figure this one out?

    without using wp_list_categories

  2. westondeboer
    Member
    Posted 6 years ago #

    Well this is the ghetto way to do it. I figured it out.

    <?php
    $thecats = $wpdb->get_results("SELECT * FROM $wpdb->terms,$wpdb->term_taxonomy WHERE $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id");
    
    foreach ($thecats as $thecat) {
    
    echo $thecat->name;
    echo $thecat->description;
    
    }
    ?>

    Will list all of the category names with the descriptions below it.

  3. David Radovanovic
    Member
    Posted 5 years ago #

    Can you share? Thanks.

  4. emanoelmelo
    Member
    Posted 5 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic