You have to change the order in $wp_query->posts
. Compare it to the values from get_option( 'sticky_posts' )
.
Example:
function move_stickies_down( $num = 1 )
{
global $wp_query;
if ( empty ( $wp_query->posts ) )
return;
$stickies = get_option( 'sticky_posts' );
if ( empty ( $stickies ) )
return;
$sticky_posts = $top = $after = array();
foreach ( $wp_query->posts as $p )
{
if ( in_array( $p->ID, $stickies ) )
{
$sticky_posts[] = $p;
}
elseif ( $num > 0 )
{
$top[] = $p;
$num -= 1;
}
else
{
$after[] = $p;
}
}
$wp_query->posts = array_merge( $top, $sticky_posts, $after );
}
Add this function to your functions.php
and call it before the loop like this:
move_stickies_down( 2 );
if ( have_posts() )
{
while ( have_posts() )
{
the_post();
// show post
}
}