Topic: Option to ignore 'sticky' in $news_query
There are 2 ways of using featured posts in WordPress,
the old way with a featured category, or the new 2.7 way with sticky posts.
Arras is one of the little theme who use the sticky feature, many themes only use the featured category.
But Arras could be a bit improved on the sticky part.
On the homepage, you could using stickies for the featured slider/content.
The result has effect on the next part 'News',
it will show this:
first: all sticky posts
next: the latest post, limited by the number you've entered.
So when you've set to display the 12 latest posts, and you have 4 stickies, it will display 16 posts.
This also affects the featured posts widget.
How to solve?
I've fixed it this way, but there might be a better way.
home.php line 61:
$news_query_args = array(
[b] 'caller_get_posts' => 1,[/b]
'cat' => $news_cat,
'paged' => $paged,
'showposts' => ( (arras_get_option('index_count') == 0 ? get_option('posts_per_page') : arras_get_option('index_count')) )
);The 'caller_get_posts' => 1 excludes stickies in the loop, which seems logical, since they're allready displayed in the featured slider/content part.
For the featured posts widget currently i haven't got the perfect sollution, for personal use i've added 'caller_get_posts' => 1 in line 231 library/widgets
$r = new WP_Query( array('caller_get_posts' => 1, 'showposts' => $instance['postcount'], 'cat' => $cat) );But an option to choose between sticky on the list of categories would be a handy addition.
Last edited by freakenstein (2010-12-20 18:15:15)
De Nachtvlinders: horror