I'm unable to substitute posts_per_page with showposts in order to limit the number of posts returned in a list. When I use showposts, the resulting menu list is correctly displayed according to the number of posts I specify in the showposts limiter. However, when I use posts_per_page, the post limiter number appears to be irrelevant. The resulting list shows all posts, exceeding the limiter count.
Examples:
This works perfectly:
$myrecentposts = get_posts(array('post_not_in' => get_option('sticky_posts'), 'cat' => "-$cat,-$catHidden",'showposts' => $cb2_recent_count));
foreach($myrecentposts as $idxrecent=>$post) {
However, when I sub in posts_per_page, this DOES NOT work...
$myrecentposts = get_posts(array('post_not_in' => get_option('sticky_posts'), 'cat' => "-$cat,-$catHidden",'posts_per_page' => $cb2_recent_count));
foreach($myrecentposts as $idxrecent=>$post) {
*I'm only trying to get posts_per_page to work because I understand that showposts has been deprecated.