remove_action('genesis_loop', 'genesis_do_loop');
add_action('genesis_loop', 'custom_sticky_loop', 9);
function custom_sticky_loop() {
if ( !is_paged() ) {
// Get all sticky posts
$sticky = get_option( 'sticky_posts' );
// Sort the stickies with the newest ones at the top
rsort( $sticky );
// Query sticky posts
$args = array(
'post__in' => $sticky,
'caller_get_posts' => 1,
'showposts' => -1
);
genesis_custom_loop( $args );
}
}
add_action('genesis_loop', 'custom_loop');
function custom_loop() {
global $paged;
// No sticky posts in this loop
$args = array(
'post__not_in' =>get_option("sticky_posts"),
'paged' => $paged
);
genesis_custom_loop( $args );
}
Leave a Reply