I'm trying to show recent custom posts in
single-events.php I can make it work by using
get_posts what I don't know how to do is exclude the post that is active so if I'm on 'Event 1' just now using the code below it will show 'Event 1' in the 'Recent Events' section. How do I get around this?
<?php $args = array( 'post_type' => 'events', ); $myposts = get_posts( $args ); foreach ( $myposts as $post ) : setup_postdata( $post ); ?>
/* EDIT */
I was missing this:
'exclude' => $post->ID