visualadvance
Member
Posted 1 year ago #
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.
try putting this after get_categories
<?php
$my_categories = get_categories();
echo '<pre>';
print_r($my_categories);
echo '</pre>';
?>
visualadvance
Member
Posted 1 year ago #
Post, and you will inevitably find the answer 5 minutes later.
I assume this is what I was looking for:
http://codex.wordpress.org/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
)