• Hello,

    I am trying to display the categories with the get_terms function with the following code:

    $categories = get_terms( 'category');
    						$categories_count = count($categories);
    
    						for ($i = 0; $i < $categories_count; $i++) {
    							echo($i . $categories[$i]->name.' <br /> ');
    						}

    But for some reason doesnt display all the categories, a couple of them are missing uncategorized and something else, this is what I see on the screen when i run this code:
    0Chairs
    1
    2Interiors
    3
    4Featured

    Thanks very much,

  • The topic ‘get_terms('category') doesnt work’ is closed to new replies.