/* Mini-Features */
?>
<div id="sub-featured" class="<?php echo $main_css_class; ?> section">
<h2 class="section-title"><?php echo stripslashes( $featured_title ); ?></h2>
<?php
query_posts( 'suppress_filters=0&post_type=infobox&order=ASC&posts_per_page=' . $mini_features_number );
if ( have_posts() ) { $count = 0; while ( have_posts() ) { the_post(); $count++;
$excerpt = stripslashes( get_post_meta( $post->ID, 'mini_excerpt', true ) );
$button = get_post_meta( $post->ID, 'mini_readmore', true );
$post_class = 'post block';
if ( $count % $mini_features_count == 0 ) { $post_class .= ' last'; }
?>
<div <?php post_class( $post_class ); ?>>
<a href="<?php echo $button; ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php woo_image( 'key=mini-image&width=300&height=150&class=thumbnail aligncenter&link=img' ); ?></a>
<h3 class="title"><a href="<?php echo $button; ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<?php if ( $excerpt ) { ?>
<div class="entry">
<?php echo $excerpt; ?>
</div>
<?php } ?>
</div><!-- /.post -->
<?php
if ( $count % $mini_features_count == 0 ) { echo '<div class="fix"></div>'; }
} // End WHILE Loop
} else {
?>
<div class="post">
<p><?php _e( 'Sorry, no posts matched your criteria.', 'woothemes' ); ?></p>
</div><!-- /.post -->
<?php } // End IF Statement ?>
</div><!-- /#mini-features -->
That's the code, somewhere within that I need to specify that only sticky_posts are displayed - this is where I come unstuck. I've taken a look at the Codex for both query_posts & sticky_posts & I've got to be honest - I'm not sure where I'd start to modify the above... The first thing I did was add the ability (to those custom post types) to include a Sticky Post meta box (thanks to: Sticky Custom Post Types - this worked a treat).
As part of the theme options I can specify how many posts I'd like to display (in my case 3x) but until I modify the above code to only display sticky_posts - I'll end up with 2x sticky_posts (& one other random one). I'm stuck, so any pointers would be greatly appreciated!