On a single Post page I have a side bar displaying up to three other, related posts. How can I exclude both Sticky Posts and the Current post?
I know how to exclude the Current post and how to exclude Sticky Posts by using post_not_in in a WP_Query, see code example below. But I guess you can not use post_not_in twice in the same query. Any suggestions?
$current_post_ID = get_the_ID(); $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'order' => 'DESC', 'orderby' => 'date', 'posts_per_page' => 3, 'post__not_in' => get_option( 'sticky_posts' ) 'post__not_in' => array($current_post_ID) );