Hi!
I've a script:
get_posts('numberposts=1');
I would like to exclude the sticky posts. How?
Thanks.
Hi!
I've a script:
get_posts('numberposts=1');
I would like to exclude the sticky posts. How?
Thanks.
Try:
get_posts( array( 'post__not_in' => get_option( 'sticky_posts' ), 'posts_per_page' => 1 ) );
http://codex.wordpress.org/Function_Reference/WP_Query#Sticky_Post_Parameters
Thanks.
You're welcome. Glad you got it resolved.
You must log in to post.