Forum Replies Created

Viewing 1 replies (of 1 total)
  • wordpress 2.7 by default has the ‘sticky’ option, but it is still ignored by the category posts plugin. I have modified the plugin to support stickies:

    replace cat-posts.php, line 40 with this:

    $cat_sticky = get_posts(array('post__in'=>get_option('sticky_posts'),'category'=>$cat_id));
    if($cat_sticky[0]){
    	$num -= count($cat_sticky);
    }
    $cat_nonSticky = get_posts(array('post__not_in'=>get_option('sticky_posts'),'category'=>$cat_id,'numberposts'=>$num));
    $cat_posts = array_merge($cat_sticky,$cat_nonSticky);

    This way, all the stickies from the category will be read first, then all the ‘non-stickies’

    Hope it works for you

Viewing 1 replies (of 1 total)