Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $recent_posts = wp_get_recent_posts( array( 'numberposts' => '1' ) );
- $thePostID = $recent_posts[30]['ID'];
- $popular = new WP_Query(array(
- 'posts_per_page'=>3,
- 'post__not_in' => array($thePostID),
- 'meta_key'=>'popular_posts',
- 'orderby'=>'meta_value_num',
- 'order'=>'DESC'
- ));
- while ($popular->have_posts()) : $popular->the_post();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement