I always have a hard time figuring out what my content options are when working with arrays in WordPress. Today I stumbled upon the content listing for Categories in the Codex:

$category->term_id
$category->name
$category->slug
$category->term_group
$category->term_taxonomy_id
$category->taxonomy
$category->description
$category->parent
$category->count
$category->cat_ID
$category->category_count
$category->category_description
$category->cat_name
$category->category_nicename
$category->category_parent

Pretty nifty, eh? Is there a better place to find content listings for tags, posts, taxonomies, etc.?

2 Comments

  1. Nik on November 8, 2011 at 4:55 pm

    Helpful – thanks!
    A lot of times in development, I just end up just wrapping print_r($categories_or_other_query) in ‘pre’ tags for a nice, formatted list of all the properties I have access to in a query.



  2. toby on November 9, 2011 at 11:08 am

    @Nik – Fantastic idea!