Bring Your Business to Life › Support › Popular Widget › Bug – Can't Set Number of Posts
Tagged: 'Recent Posts', limit, posts
- AuthorPosts
- June 24, 2012 at 2:17 pm #48170mlmoseleyParticipant
Regarding this versions inability to set the number of posts displayed for recent posts.
June 24, 2012 at 2:23 pm #48171mlmoseleyParticipantI downloaded 1.5.3 because it fixed the category bug, then found I could no longer set the number of recent posts displayed. I tracked it down to the following query in include.php:
$posts = query_posts( array(
'suppress_fun' => true,
'post_type' => $post_types,
'numberposts' => $numberposts,
'cat' => trim( $cats, ',' )
));
I changed it to:
$posts = get_posts( array(
'post_type' => $post_types,
'numberposts' => $numberposts,
'cat' => trim( $cats, ',' )
));
I have no idea what ‘suppress_fun’ was or why it broke the query, but there you go. I hope this helps others.
–Marshall
June 25, 2012 at 12:46 am #48186Xpark MediaKeymasteryou can download 1.5.4. if fixed the issue, the problem was not “suppress_fun” it was “numberposts” for the get_posts() function the right key is “posts_per_page”
- AuthorPosts
- You must be logged in to reply to this topic.