Bug – Can't Set Number of Posts

HomeSupportPopular WidgetBug – Can't Set Number of Posts

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #48170
    mlmoseley
    Participant

    Regarding this versions inability to set the number of posts displayed for recent posts.

    #48171
    mlmoseley
    Participant

    I 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

    #48186
    Xpark Media
    Keymaster

    you 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”

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.