Offsetting posts with the Arras theme

Offsetting posts with the Arras theme

The Arras theme for Wordpress is fantastic, i have only been using it for a day and am very impressed. One common thing i found people needing is the ability to offset posts so they can add as many as they want and have them display properly (not more than once) in the “Featured Articles” and “More News” sections. I have had a tweak around, and here is the easiest way i have found to do it:

Open up “home.php” in the root of the themes folder.

Find the following line:
elseif ($featured2_cat == '0') $query2 = 'showposts=' . arras_get_option('featured2_count')

And change it to:
elseif ($featured2_cat == '0') $query2 = 'showposts=' . arras_get_option('featured2_count') . '&offset=4';

This will offset the “Featured Articles #2″ section by 4 posts. For me this is perfect because i have four posts in the first “Featured Articles” section.

To then do the “Older News” (or whatever it is called) section, find the following line:

'showposts' => ( (arras_get_option('index_count') == 0 ? get_option('posts_per_page') : arras_get_option('index_count')) )
);

And change it to:

'showposts' => ( (arras_get_option('index_count') == 0 ? get_option('posts_per_page') : arras_get_option('index_count')) )
) . '&offset=13';

This will offset the news by 13 posts, because i have 4 “Featured Articles #1″ and 9 “Featured Articles #2″ which means in total i need to skip 13 posts.

Hope this helps people!