I am using get_post_custom in a category template (the posts in this particular category consist of only custom fields). When there was only 1 post in the category everything worked fine. When there is more than 1 post in the category get_post_custom fails... it doesn't return anything.
Here is how I am using it:
query_posts('cat=4&showposts=1');
if (have_posts()) : while (have_posts()) : the_post();
?>
<div class="post" id="post-<?php the_ID(); ?>">
<?php
$custom = get_post_custom($post->ID);
?>
It seems to me that $post->ID is not being populated (i.e. that $post" is not set) but I would have expected that by specifying query_posts as I have the most recent post for that category would be the one populating the $post object.
Where am I screwing this up?