• Resolved visualadvance

    (@visualadvance)


    I am doing some work with “get_categories” and all the answers show that you can get information for each category with things like:

    $category->name
    $category->count
    $category->category_nicename
    $category->description

    Where can i find some documentation on a full list of those types of properties? I have done tons of searching around, but I think my vocabulary for the language isn’t quite up to par yet to find what I need.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    try putting this after get_categories

    <?php
    $my_categories = get_categories();
    echo '<pre>';
    print_r($my_categories);
    echo '</pre>';
    ?>

    Thread Starter visualadvance

    (@visualadvance)

    Post, and you will inevitably find the answer 5 minutes later.

    I assume this is what I was looking for:
    https://codex.www.ads-software.com/Function_Reference/get_category

    It makes sense now because I was looking at get_categories (plural), and the properties would be a part of the category (single) documentation.

    stdClass Object
    (
    [term_id] => 85
    [name] => Category Name
    [slug] => category-name
    [term_group] => 0
    [term_taxonomy_id] => 85
    [taxonomy] => category
    [description] =>
    [parent] => 70
    [count] => 0
    [cat_ID] => 85
    [category_count] => 0
    [category_description] =>
    [cat_name] => Category Name
    [category_nicename] => category-name
    [category_parent] => 70
    )

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘List of Category Properties?’ is closed to new replies.