212 reputation
210
bio website grinninggecko.com
location Toronto, Canada
age 38
visits member for 3 years, 7 months
seen May 26 at 15:43

Nov
28
awarded  Critic
Nov
28
accepted Can I use a space in an option name/key?
Nov
28
comment Can I use a space in an option name/key?
@toscho I don't understand why you're mentioning selection via keyboard. I'm asking about programmatically setting and getting WP options.
Nov
28
asked Can I use a space in an option name/key?
Oct
23
awarded  Popular Question
Jun
10
awarded  Yearling
Mar
20
awarded  Notable Question
Dec
22
answered Latest/Recent posts widget title link
Dec
3
answered How to Save Different Settings Options Using Settings API and/or the Theme Optimizer
Dec
3
comment Get 1st parent category id from post
Also, if you assign the post to 2 categories (rather than just the last category in the hierarchy), you'll need to add some looping logic as $category[0] will only be one of the assigned categories, and if it's the top level category it will have no ancestors.
Dec
3
comment Get 1st parent category id from post
get_ancestors() only gives you the parents (and grand-parents, etc.), not the assigned category. That's why in the 2nd example I append $category[0]->term_id to the $hierarchy array. Does that answer your question?
Dec
3
answered Hook for image edit popup
Dec
3
answered Get 1st parent category id from post
Nov
13
awarded  Nice Question
Feb
18
awarded  Popular Question
Oct
23
awarded  Supporter
Aug
31
awarded  Teacher
May
1
awarded  Commentator
May
1
comment Exclude newest post from category X but show rest
Ya, you're right. I didn't really think it through fully. It's late and I need to sleep :)
May
1
comment Exclude newest post from category X but show rest
Edited to account for pagination (theoretically). Thanks for pointing that out.