Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $stickies = get_option( 'sticky_posts' );
- rsort( $stickies );
- $stickies = array_slice( $stickies, 0, 5 );
- $argmts = array(
- 'post__in' => $stickies,
- 'caller_get_posts' => 1,
- );
- $entradas_slider = new WP_Query($argmts);
- if ( $entradas_slider->have_posts() ) : $entradas_slider->the_post();
- ... the markup ...
- else :
- // If there are no sticky posts, show this instead.
- include 'dummy_sldr.php';
- endif;
- // Reset Post Data
- wp_reset_postdata();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement