[wp-hackers] WP Newbie w/ a Hack

Andy Skelton skeltoac at gmail.com
Wed Jun 6 02:19:32 GMT 2007


On 6/5/07, Jacob Rose <jacob at thinkgeek.com> wrote:
> $cat = array_shift( get_the_category() );
> get_calendar( true, $cat->cat_ID );
>
> I'm not sure if that's the canonical way to find the archive page's
> category id (I kinda doubt it), but it works.

I think $wp_the_query->get_queried_object_id() is what you're looking for.

Cheers,
Andy


More information about the wp-hackers mailing list