1, // number of posts to return 'cat' => $my_cat // the category id ); $lastpost = get_posts($args); // If we have at least 1 post, increment the post_counts flag if( count( $lastpost ) > 0 ) $posts_count++; // We still have to run a foreach Loop - even if there's only 1 post. foreach($lastpost as $post) : /* * Call the internal function setup_postdata(), with the $post array as its argument * This is so that we can access all post data */ setup_postdata($post); // Now we can display the post using all of the standard Loop tags ?>
>

→', 'twentyeleven' ) ); ?> '' ) ); ?>
Posted in %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> | Tagged %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> | | ', '' ); ?>