Can I use WP_Query
to only query posts less than (or greater than) a given post ID?
$filtered_query_args = array(
'post_type' => 'projects',
'order' => $prev_next=='next' ? 'DESC' : 'ASC',
'orderby' => 'ID',
// ID <= $post->ID
);
I’ve been digging around in the codex with no luck.
I can of course do this conditionally within the loop, but it would be much cleaner if I could use WP_Query
directly.
I ended up using something like this: